Skip to content

Conversation

@ilteoood
Copy link

Benchmarks

Main:

FJS creation x 22,718 ops/sec ±0.78% (97 runs sampled)
CJS creation x 274,085 ops/sec ±1.31% (91 runs sampled)
AJV Serialize creation x 96,969,652 ops/sec ±2.25% (87 runs sampled)
json-accelerator creation x 1,462,630 ops/sec ±0.45% (97 runs sampled)
JSON.stringify array x 16,035 ops/sec ±0.45% (97 runs sampled)
fast-json-stringify array default x 14,639 ops/sec ±0.48% (100 runs sampled)
json-accelerator array x 11,567 ops/sec ±0.60% (97 runs sampled)
fast-json-stringify array json-stringify x 14,630 ops/sec ±0.32% (96 runs sampled)
compile-json-stringify array x 12,554 ops/sec ±0.84% (94 runs sampled)
AJV Serialize array x 13,289 ops/sec ±0.53% (98 runs sampled)
JSON.stringify large array x 668 ops/sec ±0.50% (92 runs sampled)
fast-json-stringify large array default x 584 ops/sec ±0.43% (83 runs sampled)
fast-json-stringify large array json-stringify x 673 ops/sec ±1.11% (93 runs sampled)
compile-json-stringify large array x 568 ops/sec ±0.40% (92 runs sampled)
AJV Serialize large array x 623 ops/sec ±0.38% (95 runs sampled)
JSON.stringify long string x 63,565 ops/sec ±0.51% (95 runs sampled)
fast-json-stringify long string x 63,195 ops/sec ±0.69% (98 runs sampled)
json-accelerator long string x 63,824 ops/sec ±0.48% (96 runs sampled)
compile-json-stringify long string x 63,838 ops/sec ±0.52% (95 runs sampled)
AJV Serialize long string x 29,409 ops/sec ±0.64% (96 runs sampled)
JSON.stringify short string x 25,843,438 ops/sec ±0.64% (98 runs sampled)
fast-json-stringify short string x 75,164,429 ops/sec ±1.97% (90 runs sampled)
json-accelerator short string x 76,927,958 ops/sec ±1.50% (91 runs sampled)
compile-json-stringify short string x 45,149,640 ops/sec ±1.82% (92 runs sampled)
AJV Serialize short string x 49,126,961 ops/sec ±1.36% (88 runs sampled)
JSON.stringify obj x 9,218,881 ops/sec ±0.35% (98 runs sampled)
fast-json-stringify obj x 14,708,149 ops/sec ±0.32% (97 runs sampled)
json-accelerator obj x 12,972,310 ops/sec ±0.59% (96 runs sampled)
compile-json-stringify obj x 30,034,675 ops/sec ±1.09% (96 runs sampled)
AJV Serialize obj x 25,647,842 ops/sec ±0.57% (97 runs sampled)
JSON stringify date x 1,736,113 ops/sec ±0.24% (98 runs sampled)
fast-json-stringify date format x 2,473,266 ops/sec ±0.27% (98 runs sampled)
json-accelerate date format x 2,466,332 ops/sec ±0.28% (98 runs sampled)
compile-json-stringify date format x 1,736,477 ops/sec ±0.40% (100 runs sampled)

PR:

FJS creation x 23,365 ops/sec ±0.78% (96 runs sampled)
CJS creation x 283,284 ops/sec ±0.31% (99 runs sampled)
AJV Serialize creation x 112,666,375 ops/sec ±1.63% (95 runs sampled)
json-accelerator creation x 1,528,582 ops/sec ±0.54% (99 runs sampled)
JSON.stringify array x 16,436 ops/sec ±0.32% (100 runs sampled)
fast-json-stringify array default x 15,325 ops/sec ±0.48% (98 runs sampled)
json-accelerator array x 12,012 ops/sec ±0.28% (99 runs sampled)
fast-json-stringify array json-stringify x 15,151 ops/sec ±0.39% (97 runs sampled)
compile-json-stringify array x 13,226 ops/sec ±0.39% (98 runs sampled)
AJV Serialize array x 13,864 ops/sec ±0.34% (99 runs sampled)
JSON.stringify large array x 685 ops/sec ±1.31% (94 runs sampled)
fast-json-stringify large array default x 598 ops/sec ±0.43% (84 runs sampled)
fast-json-stringify large array json-stringify x 689 ops/sec ±0.45% (94 runs sampled)
compile-json-stringify large array x 583 ops/sec ±0.43% (95 runs sampled)
AJV Serialize large array x 632 ops/sec ±0.34% (91 runs sampled)
JSON.stringify long string x 64,483 ops/sec ±0.50% (98 runs sampled)
fast-json-stringify long string x 64,886 ops/sec ±0.56% (97 runs sampled)
json-accelerator long string x 64,525 ops/sec ±0.45% (95 runs sampled)
compile-json-stringify long string x 64,946 ops/sec ±0.48% (92 runs sampled)
AJV Serialize long string x 30,062 ops/sec ±0.31% (96 runs sampled)
JSON.stringify short string x 25,635,151 ops/sec ±0.96% (98 runs sampled)
fast-json-stringify short string x 77,976,957 ops/sec ±1.52% (92 runs sampled)
json-accelerator short string x 76,716,105 ops/sec ±1.34% (95 runs sampled)
compile-json-stringify short string x 48,370,586 ops/sec ±1.09% (97 runs sampled)
AJV Serialize short string x 51,103,059 ops/sec ±1.10% (94 runs sampled)
JSON.stringify obj x 9,210,479 ops/sec ±0.50% (95 runs sampled)
fast-json-stringify obj x 14,952,465 ops/sec ±0.31% (99 runs sampled)
json-accelerator obj x 13,375,692 ops/sec ±0.36% (96 runs sampled)
compile-json-stringify obj x 30,524,819 ops/sec ±0.63% (96 runs sampled)
AJV Serialize obj x 25,625,599 ops/sec ±0.59% (92 runs sampled)
JSON stringify date x 1,733,028 ops/sec ±0.25% (100 runs sampled)
fast-json-stringify date format x 2,507,194 ops/sec ±0.27% (97 runs sampled)
json-accelerate date format x 2,508,081 ops/sec ±0.27% (101 runs sampled)
compile-json-stringify date format x 1,739,833 ops/sec ±0.21% (101 runs sampled)

Checklist

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@Fdawgs Fdawgs changed the title chore: improve-perfs perf: improve-perfs Nov 18, 2025
Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants