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

perf: fast array copy for installed transformers #596

Merged
merged 3 commits into from
Jun 2, 2024
Merged

Conversation

KnorpelSenf
Copy link
Member

V8 is fairly optimized for [...arr] and my benchmarks only show a few nanoseconds of improvement for Deno, regardless of the size of the array. However, in general, creating an iterator over an array, traversing all elements on it, and pushing them onto a new array will be slower than a slice call. Since grammY runs in more environments, we can expect greater improvements elsewhere.

KnorpelSenf added a commit that referenced this pull request Jun 2, 2024
Copy link

codecov bot commented Jun 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.74%. Comparing base (a104c42) to head (e87ba8b).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #596      +/-   ##
==========================================
- Coverage   47.86%   47.74%   -0.13%     
==========================================
  Files          19       19              
  Lines        6159     6177      +18     
  Branches      343      343              
==========================================
+ Hits         2948     2949       +1     
- Misses       3207     3224      +17     
  Partials        4        4              

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

@KnorpelSenf KnorpelSenf merged commit d62a142 into main Jun 2, 2024
8 checks passed
@KnorpelSenf KnorpelSenf deleted the fast-array-cp branch June 2, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants