Performance optimizations for quantum chemistry calculations