You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did you also consider for scan specifically using a already existing implementation (i.e. Rocket.jl) and if yes why did you discount it? If no should we make a new issue for this?
So specialisation is used typically in functions like map (as mentioned in the link) to boost performance.
Many functions simply "pass through" an argument to somewhere else, e.g. to another function or to a storage location. Such functions do not need to be specialized for every closure that might be passed in. Fortunately this case is easy to distinguish by simply considering whether a function calls one of its arguments (i.e. the argument appears in "head position" somewhere). Performance-critical higher-order functions like map certainly call their argument function and so will still be specialized as expected.
We are using specialisation in the map function sense; its not passing a function (or function-like object) to get lowered down, its going to operate on elements of a vector in sequence with stateful updates.
I am not using the Rocket.jl version of scan because its pretty heavily embedded in using Observables, which just seems like over-kill to import en-masse into this project.
Problem
I think it is safer performance wise to activate type specialisation for functions that ingest other functions, see this.
Solution
Fix this for
scan
and check other possible usages.The text was updated successfully, but these errors were encountered: