More energy_surf() improvements from profiling. This is probably about as far as I can get without getting clever with multiprocessing or numba.