WagnerGroup / pyqmc

Python library for real space quantum Monte Carlo
MIT License
82 stars 33 forks source link

cache generate_quadrature_grids #438

Closed willwheelera closed 2 months ago

willwheelera commented 7 months ago

generate_quadrature_grids seems kind of slow in some of my small tests. I don't see a reason to recompute it every call, so added @cache decorator

lkwagner commented 7 months ago

functools.cache was only introduced in python 3.9. I think we can just as well use lru_cache which supports more versions.

lkwagner commented 2 months ago

I've implemented this in a separate commit..