Skip to content

benchmark: remove duplicate ffi string length direct - #66278

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
HoonDongKang:benchmark-remove-duplicate-string-length-direct
Sep 27, 2026
Merged

nodejs-github-bot merged 1 commit into
nodejs:mainfrom
HoonDongKang:benchmark-remove-duplicate-string-length-direct

Conversation

@HoonDongKang

@HoonDongKang HoonDongKang commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

The string_length FFI benchmark had four cases:

  • string-length-string.js passes the JavaScript string "hello".
  • string-length-buffer.js passes Buffer.from('hello\0').
  • string-length-string-direct.js and string-length-buffer-direct.js both pass a raw pointer obtained with ffi.getRawPointer().

The two direct benchmarks contained identical code: both created the same Buffer, obtained its raw pointer, and passed that pointer to string_length. This PR replaces them with a single string-length-direct.js benchmark so the same case runs only once.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/performance

@nodejs-github-bot nodejs-github-bot added benchmark Issues and PRs related to Node.js benchmarks and benchmarking infrastructure. ffi Issues and PRs related to experimental Foreign Function Interface support. labels Sep 25, 2026
Signed-off-by: HoonDongKang <d159123@naver.com>
@HoonDongKang
HoonDongKang force-pushed the benchmark-remove-duplicate-string-length-direct branch from 43b14c6 to f328905 Compare September 25, 2026 11:59
@daeyeon daeyeon added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 25, 2026
@nodejs-github-bot
nodejs-github-bot merged commit c97bbfb into nodejs:main Sep 27, 2026
37 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in c97bbfb

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 27, 2026
aduh95 pushed a commit that referenced this pull request Sep 27, 2026
Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: #66278
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
aduh95 pushed a commit that referenced this pull request Sep 28, 2026
Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: #66278
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. benchmark Issues and PRs related to Node.js benchmarks and benchmarking infrastructure. ffi Issues and PRs related to experimental Foreign Function Interface support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants