SirPurrcival / mu-internship

For all our internship needs!
2 stars 0 forks source link

General optimization #17

Open SirPurrcival opened 1 year ago

SirPurrcival commented 1 year ago

Functions we can probably get the most performance out of:

SirPurrcival commented 1 year ago

https://wiki.python.org/moin/PythonSpeed/PerformanceTips

SirPurrcival commented 1 year ago

lfp approximation cut down by a lot (from minutes to seconds), probably still room for improvement.

SirPurrcival commented 1 year ago

I timed the runtime of the script on my computer with: Nscale = 0.1 Kscale = .15 Sscale = 1. Rscale = Nscale * .3

Time required for setup: 0.25959324836730957 Time required to populate network: 1.4485700130462646 Time required for connection setup: 4.657220363616943 Time required for simulation: 68.16679549217224 Time required for fetching data: 68.60523128509521 Time required for graphing grid: 74.39840173721313 Time required for layer estimation procedure: 83.97682785987854 Time required for plotting and final time: 84.18127965927124

Note, those are times relative to the beginning of the script, not between each step. I don't know if we can improve the simulation performance somehow, maybe some nest settings about better/more parallelization that I don't know about. Connection setup might be improved, depending on how nest handles it. A few notes

I'll get you a coffee if you manage to bring down processing time further :)