-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Within Vector, use Array.Copy wherever possible (#3236)
Following the Slice and Array.Copy experiment, took just the Array.Copy parts out and built into the Vector class. This gives big performance wins in common operations: | Test | Ref | New | | --- | --- | --- | | New Vector | 41.5 | 41.4 | | Append Single | 26.6 | 4.2 | | Append Large | 26.6 | 4.2 | | Sum | 230.1 | 99.1 | | Drop First 20 and Sum | 343.5 | 96.9 | | Drop Last 20 and Sum | 311.7 | 96.9 | | Filter | 240.2 | 92.5 | | Filter With Index | 364.9 | 237.2 | | Partition | 772.6 | 280.4 | | Partition With Index | 912.3 | 427.9 | | Each | 110.2 | 113.3 | *Benchmarks run on an AWS EC2 r5a.xlarge with 1,000,000 item count, 100 iteration size run 10 times.* # Important Notes Have generally tried to push the `@Tail_Call` down from the Vector class and move to calling functions on the range class. - Expanded benchmarks on Vector - Added `take` method to Vector - Added `each_with_index` method to Vector - Added `filter_with_index` method to Vector
- Loading branch information
1 parent
1531a77
commit fb68f18
Showing
7 changed files
with
122 additions
and
64 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
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
Oops, something went wrong.