nest / nestml

A domain specific language for neuron and synapse models in spiking neural network simulation
GNU General Public License v2.0
48 stars 45 forks source link

Add benchmarks to documentation #859

Open clinssen opened 1 year ago

clinssen commented 1 year ago

Add benchmarks on the following standard models to the ReadTheDocs documentation:

Measure runtime NEST vs. NESTML for the same neuron model, but with NEST native vs. NESTML generated code.

Detailed benchmarking can use

#include <chrono>

auto t1 = std::chrono::steady_clock::now();

// ... code to benchmark ...

auto t2 = std::chrono::steady_clock::now();

double duration = std::chrono::duration_cast<std::chrono::microseconds>( t2 - t1 ).count();

Initial benchmarks show poor performance (iaf_psc_alpha model):

NESTML

Total time handling spikes: 4.795e+03 ms
Total time in update(): 7.898e+02 ms
Simulation time   : 293.35 s

NEST

Total time handling spikes: 2.553e+03 ms
Total time in update(): 2.219e+02 ms
Simulation time   : 184.71 s
med-ayssar commented 1 year ago

What are the major differences between the built-in version and the nestml version with respect to the used code.