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 { ...@@ -35,6 +35,7 @@ ASSIGNED {
mtau (ms) mtau (ms)
htau (ms) htau (ms)
ntau (ms) ntau (ms)
q10
} }
BREAKPOINT { BREAKPOINT {
...@@ -47,24 +48,23 @@ BREAKPOINT { ...@@ -47,24 +48,23 @@ BREAKPOINT {
} }
INITIAL { INITIAL {
rates(v, celsius) q10 = 3^((celsius - 6.3)/10)
rates(v)
m = minf m = minf
h = hinf h = hinf
n = ninf n = ninf
} }
DERIVATIVE states { DERIVATIVE states {
rates(v, celsius) rates(v)
m' = (minf-m)/mtau m' = (minf-m)/mtau
h' = (hinf-h)/htau h' = (hinf-h)/htau
n' = (ninf-n)/ntau n' = (ninf-n)/ntau
} }
PROCEDURE rates(v, celsius) PROCEDURE rates(v)
{ {
LOCAL alpha, beta, sum, q10 LOCAL alpha, beta, sum
q10 = 3^((celsius - 6.3)/10)
:"m" sodium activation system :"m" sodium activation system
alpha = .1 * vtrap(-(v+40),10) 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