pele-python/pele — pull request #51 by smcantab (2014-07-10 14:04:35+00:00)
Title: New hswca

rewritten the hs-wca potential so that no square roots need to be taken.

Removed extra level of indirection in operator[], now we are no longer returning by const reference because for native types the compiler knows best and returning a copy is actually faster. Performance has improved after this change (not enormously but noticeably). Ideally array would have template specialilzations that discriminate between native types and custom types, in which case returning a const reference is indeed faster. If in doubt check this out: https://stackoverflow.com/questions/270408/is-it-better-in-c-to-pass-by-value-or-pass-by-constant-reference