Something went wrong. Try again.
A napi-rs with `Env<'env> + Scope<'env, 'scope> + Local<'scope>`, subclass supported, safe rust
javascript typescript node-api napi node-addon rust nodejs
Something went wrong. Try again.
123456789101112131415161718192021222324import { createRequire } from 'node:module'
import { bench } from 'vitest'
const require = createRequire(import.meta.url)
const { createArrayJson, createArray, createArrayWithSerdeTrait,} = require('./index.node')
bench('createArrayJson', () => { JSON.parse(createArrayJson())})
bench('create array for loop', () => { createArray()})
bench('create array with serde trait', () => { createArrayWithSerdeTrait()})