GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — util: use indexed writes in Set and Map inspection by rozzilla · Pull Request #67295 · nodejs/node

Conversation

@rozzilla

@rozzilla rozzilla commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Avoid the cost of primordial push calls for each formatted entry by using indexed writes to collect formatted Set and Map entries. Similar approach as for this PR: #66872

In local 30-sample benchmarks, inspecting 50-element collections improved
throughput by 15.9% for Sets and 8.7% for Maps. Reverse comparisons
confirmed both gains, with no corrected-significant regressions in the
broader comparison.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@rozzilla
util: use indexed writes in Set and Map inspection
a38c1c3
Avoid the cost of primordial push calls for each formatted entry.

Signed-off-by: Roberto Bianchi <[email protected]>
@nodejs-github-bot

nodejs-github-bot commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/performance
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Nov 6, 2026
@codecov

codecov Bot commented Nov 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.67%. Comparing base (fca40eb) to head (a38c1c3).
⚠️ Report is 144 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67295      +/-   ##
==========================================
- Coverage   93.00%   90.67%   -2.33%     
==========================================
  Files         428      797     +369     
  Lines      195754   279605   +83851     
  Branches    30290    53789   +23499     
==========================================
+ Hits       182054   253532   +71478     
- Misses      13374    16353    +2979     
- Partials      326     9720    +9394     
Files with missing lines Coverage Δ
lib/internal/util/inspect.js 97.04% <100.00%> (+20.97%) ⬆️

... and 504 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gurgunday
gurgunday approved these changes Nov 10, 2026
View reviewed changes

@gurgunday gurgunday left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gurgunday
gurgunday reviewed Nov 10, 2026
View reviewed changes
Comment thread benchmark/util/inspect.js
Comment on lines +41 to +42
assert.strictEqual(typeof output, 'string');
assert.notStrictEqual(output.length, 0);

@gurgunday gurgunday Nov 10, 2026

Copy link
Copy Markdown
Member

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.

is this needed?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@rozzilla rozzilla Nov 11, 2026

Copy link
Copy Markdown
Contributor Author

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.

They’re sanity checks after bench.end(), so they don’t affect the measured time. The first checks util.inspect() returned the documented type; the second rejects an empty result. They’re defensive rather than strictly necessary for these inputs, but help catch an invalid benchmark result.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ljharb
ljharb approved these changes Nov 10, 2026
View reviewed changes
@gurgunday gurgunday added request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. author ready PRs with CI started, the required approvals, and no outstanding review comments. labels Nov 12, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 12, 2026
@nodejs-github-bot

nodejs-github-bot commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/79014/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gurgunday gurgunday added resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. performance Issues and PRs related to the performance of Node.js. labels Nov 13, 2026
@github-actions github-actions Bot removed the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Nov 13, 2026
@nodejs-github-bot

nodejs-github-bot commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/79036/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rozzilla rozzilla mentioned this pull request Nov 13, 2026
lib: use indexed append in ZIP central directory parser #67456
Merged
jasnell
jasnell approved these changes Nov 14, 2026
View reviewed changes
@gurgunday gurgunday added the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Nov 14, 2026
@github-actions github-actions Bot removed the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Nov 14, 2026
@nodejs-github-bot

nodejs-github-bot commented Nov 14, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/79073/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gurgunday gurgunday added commit-queue PRs queued for automated landing through the Commit Queue. commit-queue-squash PRs the Commit Queue should land as one squashed commit. labels Nov 16, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 1a36610 into nodejs:main Nov 16, 2026
95 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Landed in 1a36610

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 16, 2026
aduh95 pushed a commit that referenced this pull request Nov 19, 2026
@rozzilla @aduh95
util: use indexed writes in Set and Map inspection
4df7015
Avoid the cost of primordial push calls for each formatted entry.

Signed-off-by: Roberto Bianchi <[email protected]>
PR-URL: #67295
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
Reviewed-By: Jordan Harband <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 24, 2026
2026-11-25, Version 27.0.0-alpha.0.2.0 (Alpha) #67757
Merged
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@rozzilla @gabylb
util: use indexed writes in Set and Map inspection
d836846
Avoid the cost of primordial push calls for each formatted entry.

Signed-off-by: Roberto Bianchi <[email protected]>
PR-URL: nodejs#67295
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
Reviewed-By: Jordan Harband <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gurgunday gurgunday gurgunday approved these changes
@ljharb ljharb ljharb approved these changes
@jasnell jasnell jasnell approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-squash PRs the Commit Queue should land as one squashed commit. needs-ci PRs that need a full CI run. performance Issues and PRs related to the performance of Node.js. util Issues and PRs related to the built-in util module.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@rozzilla @nodejs-github-bot @ljharb @jasnell @gurgunday
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.