Skip to content
Snippets Groups Projects
Unverified Commit f5567d2a authored by thorstenhater's avatar thorstenhater Committed by GitHub
Browse files

Move q10 calculation to initialisation. (#999)

Pull out a constant computation from the update function to the initialisation step in the HH mechanism. In the busyring benchmark with hh/pas swapped this results in an overall speed-up
of roughly 20%.
parent f5c977ad
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@ ASSIGNED {
mtau (ms)
htau (ms)
ntau (ms)
q10
}
BREAKPOINT {
......@@ -47,24 +48,23 @@ BREAKPOINT {
}
INITIAL {
rates(v, celsius)
q10 = 3^((celsius - 6.3)/10)
rates(v)
m = minf
h = hinf
n = ninf
}
DERIVATIVE states {
rates(v, celsius)
rates(v)
m' = (minf-m)/mtau
h' = (hinf-h)/htau
n' = (ninf-n)/ntau
}
PROCEDURE rates(v, celsius)
PROCEDURE rates(v)
{
LOCAL alpha, beta, sum, q10
q10 = 3^((celsius - 6.3)/10)
LOCAL alpha, beta, sum
:"m" sodium activation system
alpha = .1 * vtrap(-(v+40),10)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment