Fast evaluation of the Coulomb energy for electron densities