Skip to content
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

Optimize shift for dense arrays #3405

Merged
merged 2 commits into from
Oct 20, 2023
Merged

Optimize shift for dense arrays #3405

merged 2 commits into from
Oct 20, 2023

Conversation

jedel1043
Copy link
Member

fixes #3402.

This optimizes it for the common case. It would be cool to see if we can somehow change the definition of IndexedProperties to also allow these optimizations when arrays have empty slots.

@jedel1043 jedel1043 added enhancement New feature or request Internal Category for changelog labels Oct 20, 2023
@jedel1043 jedel1043 added this to the v0.18.0 milestone Oct 20, 2023
@jedel1043 jedel1043 requested a review from a team October 20, 2023 18:12
@github-actions
Copy link

Test262 conformance changes

Test result main count PR count difference
Total 95,609 95,609 0
Passed 75,690 75,690 0
Ignored 19,160 19,160 0
Failed 759 759 0
Panics 0 0 0
Conformance 79.17% 79.17% 0.00%

@jedel1043 jedel1043 added performance Performance related changes and issues and removed enhancement New feature or request labels Oct 20, 2023
Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks!

@jedel1043 jedel1043 requested a review from a team October 20, 2023 18:28
@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f71039d) 45.67% compared to head (c168a5c) 45.65%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3405      +/-   ##
==========================================
- Coverage   45.67%   45.65%   -0.02%     
==========================================
  Files         483      483              
  Lines       49490    49498       +8     
==========================================
- Hits        22604    22600       -4     
- Misses      26886    26898      +12     
Files Coverage Δ
boa_engine/src/builtins/array/mod.rs 76.24% <100.00%> (-0.92%) ⬇️
boa_engine/src/object/property_map.rs 68.95% <ø> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@raskad raskad added this pull request to the merge queue Oct 20, 2023
Merged via the queue into main with commit 26d14a8 Oct 20, 2023
14 checks passed
@jedel1043 jedel1043 deleted the fast-shift branch October 21, 2023 01:34
sam-finch-tezos pushed a commit to trilitech/boa that referenced this pull request Nov 29, 2023
* Optimize `Array.prototype.shift` for dense arrays

* Optimize shifts for dense arrays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internal Category for changelog performance Performance related changes and issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Array.shift is very slow
3 participants