-
Notifications
You must be signed in to change notification settings - Fork 92
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
Use OrderedSet for cellsets #631
Comments
Should I address this already in the linked PR or leave it as a good first issue? |
This could probably be pretty self-contained PR (easier to review). Opened this mostly to see if people liked the idea :) |
What's the drawback between ordered sets and normal sets? :) |
If the problem is big and you iterate over the set, i.e. unordered, you need to visit very different chunks of data for e.g. internal variables |
The bigger issue is that "normal" sets are unordered and ordering may even mutate. E.g. you cannot easily iterate over the entries in ascending order. |
This patch changes the use of `Set` to `OrderedSet` in the grid. This means that e.g. loops over these sets follow the original specified order. This is important for performance since it can reduce cache-misses, for example. Fixes #631. Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> Co-authored-by: Dennis Ogiermann <termi-official@users.noreply.github.com>
This patch changes the use of `Set` to `OrderedSet` in the grid. This means that e.g. loops over these sets follow the original specified order. This is important for performance since it can reduce cache-misses, for example. Fixes #631. Closes #654. Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> Co-authored-by: Dennis Ogiermann <termi-official@users.noreply.github.com>
This patch changes the use of `Set` to `OrderedSet` in the grid. This means that e.g. loops over these sets follow the original specified order. This is important for performance since it can reduce cache-misses, for example. Fixes #631. Closes #654. Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> Co-authored-by: Dennis Ogiermann <termi-official@users.noreply.github.com>
This patch changes the use of `Set` to `OrderedSet` in the grid. This means that e.g. loops over these sets follow the original specified order. This is important for performance since it can reduce cache-misses, for example. Fixes #631. Closes #654. Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> Co-authored-by: Dennis Ogiermann <termi-official@users.noreply.github.com>
This patch changes the use of `Set` to `OrderedSet` in the grid. This means that e.g. loops over these sets follow the original specified order. This is important for performance since it can reduce cache-misses, for example. Fixes #631. Closes #654. Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> Co-authored-by: Dennis Ogiermann <termi-official@users.noreply.github.com>
This patch changes the use of `Set` to `OrderedSet` in the grid. This means that e.g. loops over these sets follow the original specified order. This is important for performance since it can reduce cache-misses, for example. Fixes #631. Closes #654. Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> Co-authored-by: Dennis Ogiermann <termi-official@users.noreply.github.com>
This patch changes the use of `Set` to `OrderedSet` in the grid. This means that e.g. loops over these sets follow the original specified order. This is important for performance since it can reduce cache-misses, for example. Fixes #631. Closes #654. Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com> Co-authored-by: Dennis Ogiermann <termi-official@users.noreply.github.com>
I think we should use
OrderedSet
s from https://github.com/JuliaCollections/OrderedCollections.jl for, at least, the cellsets in the grid. This will ensure that we have both fast lookup and that we can iterate cells in order. This will require JuliaCollections/OrderedCollections.jl#100 and a new release of that package so that we cansort!
in theGrid
constructor and inaddcellset
.xref discussion in #625
The text was updated successfully, but these errors were encountered: