napi-rs/bench/noop.ts

20 lines
294 B
TypeScript
Raw Normal View History

import b from 'benny'
const { noop: napiNoop } = require('./index.node')
function noop() {}
export const benchNoop = () =>
b.suite(
'noop',
b.add('napi-rs', () => {
napiNoop()
}),
b.add('JavaScript', () => {
noop()
}),
b.cycle(),
b.complete(),
)