Since #78, tracing and retracing performance has dropped. For small expressions, up to 40% of the time account for TDBMemorySimulator>>#initializeAllPrimitives. Maintain shared caches to improve the situation.
Notes:
- Profile first, e.g.:
memory := TDBMemory new.
[[10000 timesRepeat: [(TDBRangeRetracingSimulator forMemory: memory atTimes: (1 to: 3)) evaluate: [thisContext
tdbRetracingTimeIndex +1]]] timeProfile] fork
TDBMemorySimulator: introduce PrimitiveHandlers cache that maps set of requirements values (shouldIsolate etc.) to dictionary of handler blocks that take aSimulator as their first argument
- Build something similar for
pragmaPrimitives
- Consider caching
capabilityPragmas in SimulationStudio
Since #78, tracing and retracing performance has dropped. For small expressions, up to 40% of the time account for
TDBMemorySimulator>>#initializeAllPrimitives. Maintain shared caches to improve the situation.Notes:
TDBMemorySimulator: introducePrimitiveHandlerscache that maps set of requirements values (shouldIsolateetc.) to dictionary of handler blocks that takeaSimulatoras their first argumentpragmaPrimitivescapabilityPragmasin SimulationStudio