Skip to content
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

Grids of AttractorViaRecurrences unecessarily limit the number type to Float64 #98

Open
Datseris opened this issue Oct 1, 2023 · 2 comments
Labels
good first issue Good for newcomers performance numeric performance and optimizing it

Comments

@Datseris
Copy link
Member

Datseris commented Oct 1, 2023

The grids used in AttractorsViaRecurrences convert all numbers to Float64. E.g., we have:

function RegularGrid(grid::NTuple)
    D = length(grid)
    grid_steps = SVector{D,Float64}(step.(grid))
    grid_maxima = SVector{D,Float64}(maximum.(grid))
    grid_minima = SVector{D,Float64}(minimum.(grid))
    return RegularGrid(grid_steps, grid_minima, grid_maxima, grid)
end

This is unecessary. We should simply extract the number type T and use vectors of type T. This can impact performance if different number types are used.

@Datseris Datseris added good first issue Good for newcomers performance numeric performance and optimizing it labels Oct 1, 2023
@nihcompmed
Copy link

Are there a large number of places in DynamicalSystems.jl where this lower precision type specification is hard-coded? I'm asking because I'm experimenting with root finding algorithm basins and I need to use very high precision for the standards of that field. I don't mind changing a few functions by hand but if it's the whole package ....
Thank you.

@Datseris
Copy link
Member Author

No other place. See also the function 'fixedpoints' from ChaosTools.jl that uses interval arethmetic for max precision

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers performance numeric performance and optimizing it
Projects
None yet
Development

No branches or pull requests

2 participants