Skip to content

Commit e90ada5

Browse files
committed
🧹 chore: using compact view for benchmark
1 parent fd56be9 commit e90ada5

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

benchmarks/utils.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { bench, run, barplot, summary } from 'mitata'
1+
import { bench, run, barplot, summary, compact } from 'mitata'
22

33
import { createAccelerator } from '../src'
44
import fastJson from 'fast-json-stringify'
@@ -18,18 +18,20 @@ export const benchmark = <T extends TAnySchema>(
1818

1919
if (process.env.DEBUG) console.log(encode.toString())
2020

21-
barplot(() => {
22-
summary(() => {
23-
bench('JSON Stingify', () => {
24-
return JSON.stringify(value)
25-
})
21+
compact(() => {
22+
barplot(() => {
23+
summary(() => {
24+
bench('JSON Stingify', () => {
25+
return JSON.stringify(value)
26+
})
2627

27-
bench('Fast Json Stringify', () => {
28-
return fastJsonStringify(value)
29-
})
28+
bench('Fast Json Stringify', () => {
29+
return fastJsonStringify(value)
30+
})
3031

31-
bench('JSON Accelerator', () => {
32-
return encode(value)
32+
bench('JSON Accelerator', () => {
33+
return encode(value)
34+
})
3335
})
3436
})
3537
})

0 commit comments

Comments
 (0)