-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic Object Calculation (form and speed) #35
Comments
Inside object with single timestep
|
How to make
|
Pre-compiled operations:
|
|
Suppress division by zero. Which would be a huge headache?
|
Does using compiled 2 (or 1) operator functions increase speed?
|
|
|
Equation evaluator:
|
First draft iterator of operators parsed above:
|
|
Turn all state variable references into integer keyed Dict and performance jumps -- executing time comes down by 99% from base case
|
Add an interpolated lookup, which is definitely a high overhead operation, runtime increases substantially, 1 lookup is about 8x the execution time of a single equation op.
|
Testing large JSON import components (to debug performance lag when embedded in HSP2 versus testing)
THE slowdown IS ACCESSING THINGS FROM THE OP_TOKENS dict
|
Test effect of array type for tokens iteration:
|
Test array type for state data read-write storage on iteration:
|
Overview
case
andif-then
statements, which allow decision trees to be rendered into conceptual groupings and are therefore more easily understood.JIT and Compilations references
Several objects appear to be solvable with
numba
compilable methods:ts
": Setting data ints
andui
, pass by reference in python functions #19import_uci
time with the whole sequence of operationsnumba
and@njit
compatible, so that functions compile rapidly.ts
data frame, then written to thehdf5
file at the end of the simulation. See: Setting data ints
andui
, pass by reference in python functions #19Solver Options
Performance Inspection
Types of operations
model_tokenizer_recursive()
,How many operands do equations have?
model_tokenizer_recursive()
,Performance Tweaking
Setting
Dict
Values inside@njit
function@njt
Dict
outside of an@njit
function is ~10x slower than setting the values insidenjit
function that both calculates AND writes to theDict
is about 20% faster than calling onenjit
funcdtion to calculate the lookup, then calling a secondnjit
funcdtion to write the data to theDict
Simple
njit
function to calculate lookup without saving0.22744989395141602 seconds
Call
njit
function to calculate lookup, Store inDict
outside ofnjit
2.0565061569213867 seconds
njit
onlyLookup and Write to
Dict
inside single njit function0.8163661956787109 seconds
(after initial function compilation which takes ~ 0.5 seconds)njit
Lookup and Write to
Dict
inside separatenjit
functions0.8163661956787109 seconds
(after initial function compilation which takes ~ 0.5 seconds)njit
The text was updated successfully, but these errors were encountered: