Skip to content

benchmark: remove old alias usage in ffi benchmarks#63666

Open
addaleax wants to merge 1 commit into
nodejs:mainfrom
addaleax:ffi-benchmark-fix
Open

benchmark: remove old alias usage in ffi benchmarks#63666
addaleax wants to merge 1 commit into
nodejs:mainfrom
addaleax:ffi-benchmark-fix

Conversation

@addaleax
Copy link
Copy Markdown
Member

Follow-up to df09b2a.

Refs: #63482

Follow-up to df09b2a.

Refs: nodejs#63482
Signed-off-by: Anna Henningsen <anna@addaleax.net>
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/performance

@addaleax addaleax added benchmark Issues and PRs related to the benchmark subsystem. ffi Issues and PRs related to experimental Foreign Function Interface support. labels May 30, 2026
Comment thread benchmark/ffi/add-f64.js

const { lib, functions } = ffi.dlopen(libraryPath, {
add_f64: { result: 'f64', parameters: ['f64', 'f64'] },
add_f64: { result: 'f64', arguments: ['f64', 'f64'] },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess this should be return df09b2a#diff-58e332998f95a4eba485ff5fcee1e396ae23b1ac86d099926cd23d12995ba0dcL129-L132

Suggested change
add_f64: { result: 'f64', arguments: ['f64', 'f64'] },
add_f64: { return: 'f64', arguments: ['f64', 'f64'] },

Comment thread benchmark/ffi/getpid.js

const { lib, functions } = ffi.dlopen(null, {
uv_os_getpid: { result: 'i32', parameters: [] },
uv_os_getpid: { result: 'i32', arguments: [] },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
uv_os_getpid: { result: 'i32', arguments: [] },
uv_os_getpid: { return: 'i32', arguments: [] },


const { lib, functions } = ffi.dlopen(libraryPath, {
sum_6_i32: { result: 'i32', parameters: ['i32', 'i32', 'i32', 'i32', 'i32', 'i32'] },
sum_6_i32: { result: 'i32', arguments: ['i32', 'i32', 'i32', 'i32', 'i32', 'i32'] },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
sum_6_i32: { result: 'i32', arguments: ['i32', 'i32', 'i32', 'i32', 'i32', 'i32'] },
sum_6_i32: { return: 'i32', arguments: ['i32', 'i32', 'i32', 'i32', 'i32', 'i32'] },


const { lib, functions } = ffi.dlopen(libraryPath, {
pointer_to_usize: { result: 'u64', parameters: ['pointer'] },
pointer_to_usize: { result: 'u64', arguments: ['pointer'] },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
pointer_to_usize: { result: 'u64', arguments: ['pointer'] },
pointer_to_usize: { return: 'u64', arguments: ['pointer'] },


const { lib, functions } = ffi.dlopen(libraryPath, {
sum_buffer: { result: 'u64', parameters: ['pointer', 'u64'] },
sum_buffer: { result: 'u64', arguments: ['pointer', 'u64'] },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
sum_buffer: { result: 'u64', arguments: ['pointer', 'u64'] },
sum_buffer: { return: 'u64', arguments: ['pointer', 'u64'] },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmark Issues and PRs related to the benchmark subsystem. ffi Issues and PRs related to experimental Foreign Function Interface support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants