Skip to content

benchmark: remove duplicate ffi string length direct - #66278

Open
HoonDongKang wants to merge 1 commit into
nodejs:mainfrom
HoonDongKang:benchmark-remove-duplicate-string-length-direct
Open

HoonDongKang wants to merge 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
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. commit-queue PRs queued for automated landing through the Commit Queue. 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