All spherical harmonics codes should switch to a sphericart based implementation. I tested this in a separate repo and will transfer it over. It is both very elegant and fast. I get about a factor 2-3 speedup on very small basis sizes (say L = 3 to 5).
On large bases there is a small speedup but it's not that significant.
All spherical harmonics codes should switch to a
sphericart
based implementation. I tested this in a separate repo and will transfer it over. It is both very elegant and fast. I get about a factor 2-3 speedup on very small basis sizes (say L = 3 to 5).On large bases there is a small speedup but it's not that significant.
See also this issue