neuronsimulator / nrn

NEURON Simulator
http://nrn.readthedocs.io
Other
376 stars 113 forks source link

Performance issue for `diam`. #2913

Closed 1uc closed 2 weeks ago

1uc commented 3 weeks ago

If I understand parts of #2787 correctly, one problem is related to the use of diam. I've looked at the generated code and see:

#define diam          *_ppvar[0].get<double*>()

which would cause each access to dereference the generic_data_handle, which we've seen in #2886 to cause performance issues.

My understanding is that diam is a dparam, and therefore semantically one double* per instance. Slight quirk, I think it's into the MORPHOLOGY "mechanism" which is special. However, it's still a double* per instance and therefore it should be part of neuron::cache::Model.

The purpose of this issue is simply to extract a solvable chunk of #2787.