Closed sandypreiss closed 3 years ago
After profiling the model, compute_habit() was the most prominent bottleneck.
compute_habit()
By keeping a separate deque of concentration values that influence habit and its running sum, we avoid the two most prominent bottlenecks:
deque
These improvements reduced average runtime from 4.7 to 0.6 seconds!
After profiling the model,
compute_habit()
was the most prominent bottleneck.By keeping a separate
deque
of concentration values that influence habit and its running sum, we avoid the two most prominent bottlenecks:These improvements reduced average runtime from 4.7 to 0.6 seconds!