Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-imagine xxxmap, makes >>. about 2x as fast
This commit completely re-imagines the nodemap / deepmap / duckmap functionality, makes them about 2x as fast with about 1/8 of the memory churn (in a benchmark of `my @A = ^1000; @A>>.++ for ^1000`) So what does this do: - move implementation of nodemap / deepmap / duckmap as methods of Any to Any-iterable (as they probably should have been during the GLR, but I guess it worked the way it did so it was left then). - the nodemap / deepmap / duckmap subs are now frontends for the the associated methods - the HYPERxxx subs now call the methods instead of the subs - the nodemap implementation no longer randomizes the order in which the mapping occurs. I don't see this as a property of nodemap: the fact that it was implemented like that, was that hypering callables that are nodal, calls nodemap(). And to make sure that code doesn't depend on the *order* in which hypering is performed, it would randomize that to some extent. Oddly enough, when hypering a callable that is *not* nodal, deepmap() would be called, which was never randomized. - this is spectest clean, but this only shows that we have no tests for the randomization of hypering.
- Loading branch information
Showing
4 changed files
with
153 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters