-
Notifications
You must be signed in to change notification settings - Fork 323
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
Within Vector, use Array.Copy wherever possible #3236
Conversation
distribution/lib/Standard/Base/0.2.32-SNAPSHOT/src/Data/Vector.enso
Outdated
Show resolved
Hide resolved
distribution/lib/Standard/Base/0.2.32-SNAPSHOT/src/Data/Vector.enso
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from reconsidering the slice
name, the rest looks good to me.
Hurray for the performance improvements! 🎉
6b9c0af
to
cf7f101
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely amazing results ❤️
Discovered an issue with polyglot arrays and Array.Copy.
Will print Raised a ticket to look at the way polyglot arrays are used in vector and solve this issue: |
In such a case, James, please always do the following steps:
|
5b130a5
to
ecd9118
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enso code looks good, I don't understand how the workaround fixes the described Array.copy
issue though. But I'm told cases that didn't work, work now.
I think @kustosz should take a look at this before merge too.
Revised stats:
|
63cb457
to
c76870d
Compare
Tweak for reduce and all
Filter and Partition tweaks
Revert + and take to use iterative approach for now
Co-authored-by: Radosław Waśko <[email protected]>
Co-authored-by: Radosław Waśko <[email protected]>
c76870d
to
b2a3b0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though I hope my proposed fix for Array.copy
works and un-breaks all of this :)
Co-authored-by: Marcin Kostrzewa <[email protected]>
Pull Request Description
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:
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.take
method to Vectoreach_with_index
method to Vectorfilter_with_index
method to VectorChecklist
Please include the following checklist in your PR: