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

optimise mosaic #782

Open
rafaqz opened this issue Oct 8, 2024 · 0 comments
Open

optimise mosaic #782

rafaqz opened this issue Oct 8, 2024 · 0 comments

Comments

@rafaqz
Copy link
Owner

rafaqz commented Oct 8, 2024

With all the benchmarking and work on other methods I just want to write this down for the worst offender in the package currently.

mosaic is terrible.

We need to optimise first and last to just write each layer in the right order and use dims2indices to get the indices for each axis rather than working one pixel at a time.

Other methods like sum or mean we can optimise by first calculating the destination indices for each layer as Vector{Int} (with possible duplicate values) for each axis, then going line by line and doing the reduction on iterators of the intersecting layers. This will be really fast. We can also do it over DiskArrays.eachchunk of the destination array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant