-
Notifications
You must be signed in to change notification settings - Fork 54
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 bulk IntMap operations for efficiency #39
Comments
I think this depends on #38 being implemented first (or else more ugly |
This is entirely orthogonal. I'll submit a PR shortly to explain what I On Mon, Aug 29, 2016 at 11:59 PM, Ivan Lazar Miljenovic <
|
Oh, for the |
Yes, my first change is to the (&) operator for the PatriciaTree On Tue, Aug 30, 2016 at 12:04 AM, Ivan Lazar Miljenovic <
|
Use `Data.IntMap.differenceWith` to implement `(&)` and `match` for `Data.Graph.Inductive.PatriciaTree`. Instead of modifying the graph manually, one key at a time, `differenceWith` will efficiently partition the set of keys to be modified along the structure of the graph. This should be considerably more efficient when inserting or matching on well-connected nodes. Fixes haskell#39
Use `Data.IntMap.differenceWith` to implement `(&)` and `match` for `Data.Graph.Inductive.PatriciaTree`. Instead of modifying the graph manually, one key at a time, `differenceWith` will efficiently partition the set of keys to be modified along the structure of the graph. This should be considerably more efficient when inserting or matching on well-connected nodes. Fixes haskell#39
* Use `Data.IntMap.differenceWith` to implement `(&)` and `match` for `Data.Graph.Inductive.PatriciaTree`. Instead of modifying the graph manually, one key at a time, `differenceWith` will efficiently partition the set of keys to be modified along the structure of the graph. This should be considerably more efficient when inserting or matching on well-connected nodes. * Require `containers >= 0.5.0`. Since that came out in 2012, and works with `base` going all the way back to 4.2 (which came out in 2009) it seems a reasonable dependency. I want it for `Data.IntMap.Strict`. Fixes haskell#39
* Use `Data.IntMap.differenceWith` to implement `(&)` and `match` for `Data.Graph.Inductive.PatriciaTree`. Instead of modifying the graph manually, one key at a time, `differenceWith` will efficiently partition the set of keys to be modified along the structure of the graph. This should be considerably more efficient when inserting or matching on well-connected nodes. * Require `containers >= 0.5.0`. Since that came out in 2012, and works with `base` going all the way back to 4.2 (which came out in 2009) it seems a reasonable dependency. I want it for `Data.IntMap.Strict`. Fixes haskell#39
Use `Data.IntMap.differenceWith` to implement `(&)` and `match` for `Data.Graph.Inductive.PatriciaTree`. Instead of modifying the graph manually, one key at a time, `differenceWith` will efficiently partition the set of keys to be modified along the structure of the graph. This should be considerably more efficient when inserting or matching on well-connected nodes. Fixes haskell#39
* Add the benchmarks to `fgl.cabal`. * Disable AVL benchmarks that result in errors. Surely something needs to be fixed! * Add benchmark for building a full graph with `&`. * Enable GHC optimizations. Otherwise, none of the `RULES` or inlining the source code talks about can ever happen. Add cabal benchmark integration * Add the benchmarks to `fgl.cabal`. * Disable AVL benchmarks that result in errors. Surely something needs to be fixed! * Add benchmark for building a full graph with `&`. Use bulk IntMap operations * Use `Data.IntMap.differenceWith` to implement `(&)` and `match` for `Data.Graph.Inductive.PatriciaTree`. Instead of modifying the graph manually, one key at a time, `differenceWith` will efficiently partition the set of keys to be modified along the structure of the graph. This should be considerably more efficient when inserting or matching on well-connected nodes. * Require `containers >= 0.5.0`. Since that came out in 2012, and works with `base` going all the way back to 4.2 (which came out in 2009) it seems a reasonable dependency. I want it for `Data.IntMap.Strict`. Fixes haskell#39 Use bulk IntMap operations Use `Data.IntMap.differenceWith` to implement `(&)` and `match` for `Data.Graph.Inductive.PatriciaTree`. Instead of modifying the graph manually, one key at a time, `differenceWith` will efficiently partition the set of keys to be modified along the structure of the graph. This should be considerably more efficient when inserting or matching on well-connected nodes. Fixes haskell#39
* Use `Data.IntMap.differenceWith` to implement `(&)` and `match` for `Data.Graph.Inductive.PatriciaTree`. Instead of modifying the graph manually, one key at a time, `differenceWith` will efficiently partition the set of keys to be modified along the structure of the graph. This should be considerably more efficient when inserting or matching on well-connected nodes. * Require `containers >= 0.5.0`. Since that came out in 2012, and works with `base` going all the way back to 4.2 (which came out in 2009) it seems a reasonable dependency. I want it for `Data.IntMap.Strict`. Fixes haskell#39
* Use `Data.IntMap.differenceWith` to implement `(&)` and `match` for `Data.Graph.Inductive.PatriciaTree`. Instead of modifying the graph manually, one key at a time, `differenceWith` will efficiently partition the set of keys to be modified along the structure of the graph. This should be considerably more efficient when inserting or matching on well-connected nodes. * Require `containers >= 0.5.0`. Since that came out in 2012, and works with `base` going all the way back to 4.2 (which came out in 2009) it seems a reasonable dependency. I want it for `Data.IntMap.Strict`. Fixes haskell#39
* Add the benchmarks to `fgl.cabal`. * Disable AVL benchmarks that result in errors. Surely something needs to be fixed! * Add benchmark for building a full graph with `&`. * Enable GHC optimizations. Otherwise, none of the `RULES` or inlining the source code talks about can ever happen. Add cabal benchmark integration * Add the benchmarks to `fgl.cabal`. * Disable AVL benchmarks that result in errors. Surely something needs to be fixed! * Add benchmark for building a full graph with `&`. Use bulk IntMap operations * Use `Data.IntMap.differenceWith` to implement `(&)` and `match` for `Data.Graph.Inductive.PatriciaTree`. Instead of modifying the graph manually, one key at a time, `differenceWith` will efficiently partition the set of keys to be modified along the structure of the graph. This should be considerably more efficient when inserting or matching on well-connected nodes. * Require `containers >= 0.5.0`. Since that came out in 2012, and works with `base` going all the way back to 4.2 (which came out in 2009) it seems a reasonable dependency. I want it for `Data.IntMap.Strict`. Fixes haskell#39 Use bulk IntMap operations Use `Data.IntMap.differenceWith` to implement `(&)` and `match` for `Data.Graph.Inductive.PatriciaTree`. Instead of modifying the graph manually, one key at a time, `differenceWith` will efficiently partition the set of keys to be modified along the structure of the graph. This should be considerably more efficient when inserting or matching on well-connected nodes. Fixes haskell#39
Insertion, for example, should be able to use the ill-named
differenceWithKey
function. First, form a map consisting of operations to perform on predecessor/successor nodes; then usedifferenceWithKey
to perform them. When inserting nodes with many predecessors/successors, this should be faster than modifying them all sequentially. ThemergeWithKey
function would probably be more appropriate, but I hope to deprecate that eventually in favor of a safer variation on the theme.The text was updated successfully, but these errors were encountered: