fix: test

This commit is contained in:
Chubby Granny Chaser
2025-11-23 20:34:05 +00:00
parent dc04cff378
commit c3880ce181
32 changed files with 5800 additions and 1 deletions

21
rust/benchmark/bench.ts Normal file
View File

@@ -0,0 +1,21 @@
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())

View File

@@ -0,0 +1,3 @@
{
"type": "module"
}

View File

@@ -0,0 +1,10 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"moduleResolution": "NodeNext",
"module": "NodeNext",
"outDir": "lib"
},
"include": ["."],
"exclude": ["lib"]
}