-
Notifications
You must be signed in to change notification settings - Fork 0
Added dynamic typing of StateInt, StateSparseSets; Int -> <:Integer
#76
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
base: master
Are you sure you want to change the base?
Conversation
|
|
This is a big hit at the performance. Is it possible that the issue is not only in finding the type but that this also introduces type instability (the type can only be deduced during runtime?) |
|
Just checked the same with Runtime
Memory
As a sidenote, we should definitely start adding some benchmarks into our packages with the airspeed package. We can have it comment the benchmark results on PRs, which is super cool. It can also benchmark prior versions of our packages to see how our performance has changed with new releases. |
Likely something along these lines. I think this video would be a good starting place to check this. |



StateIntandStateSparseSetare now parametric and dynamically decide for the smallest type usingHerbCore.smallest_Int_type.Int(which defaults toInt64on 64-bit machines) but now the abstract typeInteger(for whichUInt8 <: IntegerandInt <: Integerholds)Requires Herb-AI/HerbCore.jl#41
Why this is still a draft:
We have to decide what types we want to allow here—the more types we iterate over in
smallest_Int_type,the slower the enumeration potentially. I will test this as soon as possible.As
StateInts are initialized byStateSparseSets exclusively,StateSparseSetshould do type narrowing, andStateIntshould inherit the type from it.