Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Oct 1, 2025

Alternative to #54772, as suggested by #54772 (comment)

@aduh95 aduh95 added the needs-benchmark-ci PR that need a benchmark CI run. label Oct 1, 2025
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. typings labels Oct 1, 2025
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.45%. Comparing base (b8ea0e8) to head (02feba6).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60084      +/-   ##
==========================================
+ Coverage   88.43%   88.45%   +0.01%     
==========================================
  Files         703      703              
  Lines      207795   207819      +24     
  Branches    40022    40029       +7     
==========================================
+ Hits       183767   183824      +57     
+ Misses      16021    15976      -45     
- Partials     8007     8019      +12     
Files with missing lines Coverage Δ
lib/internal/per_context/primordials.js 99.19% <100.00%> (+0.02%) ⬆️
lib/internal/perf/observe.js 91.55% <100.00%> (ø)

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

*/
primordials.SafeArrayPrototypePushApply = (arr, items) => {
let start = 0;
let end = start + 0x1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason not to make this just end = 4096?

let end = start + 0x1000;
while (end < items.length) {
ArrayPrototypePushApply(arr, ArrayPrototypeSlice(items, start, start = end));
end += 0x1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like the code may be more readable if 4096 was used instead of hex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-benchmark-ci PR that need a benchmark CI run. needs-ci PRs that need a full CI run. typings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants