Menu

Commit [r24171]  Maximize  Restore  History

Moved the costly calculation of the matrix exponential out of for loops.

It was the numpy.eig and numpy.inv which was draining power.

This speeds up model NS R1rho 2site, by a factor 4X:
BEFORE:
Single:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 32.552 32.552 <string>:1(<module>)
1 0.002 0.002 32.552 32.552 pf_nsr1rho2site:530(single)
Cluster:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 33.307 33.307 <string>:1(<module>)
1 0.008 0.008 33.307 33.307 pf_nsr1rho2site:554(cluster)

AFTER:
Single:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 8.286 8.286 <string>:1(<module>)
1 0.002 0.002 8.286 8.286 pf_nsr1rho2site:530(single)
Cluster:
ncalls tottime percall cumtime percall filename:lineno(function)
1 0.000 0.000 8.223 8.223 <string>:1(<module>)
1 0.007 0.007 8.223 8.223 pf_nsr1rho2site:554(cluster)

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion models for Clustered analysis.

tlinnet 2014-06-19

changed /branches/disp_spin_speed/lib/dispersion/ns_r1rho_2site.py
/branches/disp_spin_speed/lib/dispersion/ns_r1rho_2site.py Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.