soft-matter / mr

particle tracking and microrheology toolkit
GNU General Public License v3.0
3 stars 7 forks source link

Store and recall pyFFTW wisdom, so it runs fast every time. #21

Open danielballan opened 10 years ago

danielballan commented 10 years ago

http://hgomersall.github.io/pyFFTW/sphinx/tutorial.html#quick-and-easy-the-pyfftw-interfaces-module

danielballan commented 10 years ago

Turning on the cache helps.

BEFORE:

bandpass single pre-loaded image
10 loops, best of 3: 63.4 ms per loop
batch locate frames
1 loops, best of 3: 14.2 s per loop

AFTER pyfftw.interfaces.cache.enabled():

bandpass single pre-loaded image
10 loops, best of 3: 47.2 ms per loop
batch locate frames
1 loops, best of 3: 13.9 s per loop