Skip to content

lib: add primitive fast path to structuredClone#64190

Open
araujogui wants to merge 1 commit into
nodejs:mainfrom
araujogui:structuredclone-primitive-fast-path
Open

lib: add primitive fast path to structuredClone#64190
araujogui wants to merge 1 commit into
nodejs:mainfrom
araujogui:structuredclone-primitive-fast-path

Conversation

@araujogui

Copy link
Copy Markdown
Member
Benchmark
                                                    confidence improvement accuracy (*)    (**)   (***)
misc/structured-clone.js n=10000 type='arraybuffer'                 0.52 %       ±1.04%  ±1.38%  ±1.80%
misc/structured-clone.js n=10000 type='object'                      0.35 %       ±0.98%  ±1.31%  ±1.72%
misc/structured-clone.js n=10000 type='primitive'          ***    480.42 %      ±27.38% ±36.89% ±48.97%
misc/structured-clone.js n=10000 type='string'             ***    629.04 %       ±9.84% ±13.26% ±17.60%

Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 4 comparisons, you can thus expect the following amount of false-positive results:
  0.20 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.04 false positives, when considering a   1% risk acceptance (**, ***),
  0.00 false positives, when considering a 0.1% risk acceptance (***)

Copilot AI review requested due to automatic review settings June 28, 2026 14:06
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/performance

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. worker Issues and PRs related to Worker support. labels Jun 28, 2026
@araujogui araujogui force-pushed the structuredclone-primitive-fast-path branch from d4d705c to 1721b72 Compare June 28, 2026 14:22
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
@araujogui araujogui force-pushed the structuredclone-primitive-fast-path branch from 1721b72 to 14c1d64 Compare June 28, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. worker Issues and PRs related to Worker support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants