Files
hydra/rust/benchmark/bench.ts
Chubby Granny Chaser c3880ce181 fix: test
2025-11-23 20:34:05 +00:00

22 lines
283 B
TypeScript

import { Bench } from 'tinybench'
import { plus100 } from '../index.js'
function add(a: number) {
return a + 100
}
const b = new Bench()
b.add('Native a + 100', () => {
plus100(10)
})
b.add('JavaScript a + 100', () => {
add(10)
})
await b.run()
console.table(b.table())