In P , the two-electron integrals are kept in memory because they require a fast random access. Considering the large number of two-electron integrals, a hash table is the natural choice allowing the storage of only non-zero values with a data retrieval in near constant time. However, standard hashing algorithms tend to shu e data to limit the probability of collisions. Here, we favor data locality using the hash function given in Algorithm 1. is hash function i) returns the same value for all keys related by permutation symmetry, ii) keeps some locality in the storage of data, and iii) can be evaluated in 10 CPU cycles (estimated with MAQAO 103 ) if the integer divisions by two are replaced by right bit shi instructions.