napi-rs/bench/noop.ts
2020-09-30 15:31:17 +08:00

19 lines
294 B
TypeScript

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(),
)