  We describe an algorithm to efficiently compute the second-Born self-energy
of many-body perurbation theory. The core idea consists in dissecting the set
of all four-index Coulomb integrals into properly chosen subsets, thus avoiding
to loop over those indices for which the Coulomb integrals are zero or
negligible. The scaling properties of the algorithm with the number of basis
functions is discussed. The computational gain is demonstrated in the case of
one-particle Kohn-Sham basis for organic molecules.
