JuliaDynamics / ChaosTools.jl

Tools for the exploration of chaos and nonlinear dynamics
https://juliadynamics.github.io/DynamicalSystemsDocs.jl/chaostools/stable/
MIT License
186 stars 35 forks source link

Remove boundcheck for SparseArray.jl #287

Closed awage closed 1 year ago

awage commented 1 year ago

After a profiling of the code for the sparse version of the AttractorsViaRecurrences I found that 50% of the computing time was dedicated to @boundcheck in the SparseArray.jl file (no joking!). I removed this boundcheck assuming that the user will never use the version included in ChaosTools.jl.

However this is a strong performance vs safety case.

The other change is minor: change from error to @warn when the safety counter hits the ceiling. The initial condition is labeled -1 and the program goes on. It is frustrating when the continuation program throws an error after two hours of computing.