Skip to content

Conversation

@cesco69
Copy link
Contributor

@cesco69 cesco69 commented Jan 16, 2026

This is the new output of the benchmark lib compare

npm run benchmark

> fast-json-stringify@6.2.0 benchmark
> node --expose-gc ./benchmark/bench-cmp-lib.js


--- creation ---
🏆 AJV                                      x      13,095,886 ops/sec ±0.13% (17095476 runs sampled)
   json-accelerator                         x         752,551 ops/sec ±1.50% (722124 runs sampled)
   compile-json-stringify                   x         338,564 ops/sec ±0.32% (328564 runs sampled)
   fast-json-stringify                      x           8,304 ops/sec ±0.57% (8142 runs sampled)

--- array ---
🏆 fast-json-stringify [json-stringify]     x           8,707 ops/sec ±0.60% (8526 runs sampled)
   JSON.stringify                           x           8,627 ops/sec ±0.41% (8545 runs sampled)
   fast-json-stringify [default]            x           8,315 ops/sec ±0.93% (8008 runs sampled)
   compile-json-stringify                   x           7,376 ops/sec ±0.64% (7236 runs sampled)
   AJV                                      x           7,263 ops/sec ±0.72% (7098 runs sampled)
   json-accelerator                         x           5,995 ops/sec ±0.73% (5878 runs sampled)

--- large array ---
🏆 fast-json-stringify [default]            x             368 ops/sec ±3.44% (348 runs sampled)
   compile-json-stringify                   x             324 ops/sec ±3.88% (305 runs sampled)
   JSON.stringify                           x             306 ops/sec ±2.25% (303 runs sampled)
   fast-json-stringify [json-stringify]     x             293 ops/sec ±2.64% (290 runs sampled)
   AJV                                      x             250 ops/sec ±5.24% (219 runs sampled)

--- long string ---
🏆 json-accelerator                         x          37,545 ops/sec ±0.69% (35549 runs sampled)
   fast-json-stringify                      x          36,084 ops/sec ±0.64% (34278 runs sampled)
   compile-json-stringify                   x          35,678 ops/sec ±0.65% (34237 runs sampled)
   JSON.stringify                           x          34,595 ops/sec ±0.61% (33262 runs sampled)
   AJV                                      x           9,879 ops/sec ±0.67% (9679 runs sampled)

--- short string ---
🏆 json-accelerator                         x      11,877,685 ops/sec ±0.09% (15198314 runs sampled)
   fast-json-stringify                      x      11,840,083 ops/sec ±0.15% (15109116 runs sampled)
   compile-json-stringify                   x      10,855,159 ops/sec ±0.19% (13231473 runs sampled)
   AJV                                      x      10,465,767 ops/sec ±0.22% (12311031 runs sampled)
   JSON.stringify                           x       6,387,540 ops/sec ±0.08% (5669101 runs sampled)

--- obj ---
🏆 compile-json-stringify                   x       9,925,158 ops/sec ±0.14% (10336623 runs sampled)
   AJV                                      x       9,358,225 ops/sec ±12.40% (8023148 runs sampled)
   fast-json-stringify                      x       6,823,055 ops/sec ±0.15% (5748096 runs sampled)
   json-accelerator                         x       5,730,326 ops/sec ±0.54% (5168567 runs sampled)
   JSON.stringify                           x       4,142,449 ops/sec ±0.36% (3858776 runs sampled)

--- date ---
🏆 json-accelerate                          x         786,927 ops/sec ±0.35% (712618 runs sampled)
   fast-json-stringify                      x         644,667 ops/sec ±0.28% (616435 runs sampled)
   JSON.stringify                           x         530,199 ops/sec ±23.34% (419698 runs sampled)
   compile-json-stringify                   x         492,356 ops/sec ±0.17% (446835 runs sampled)

Refactor benchmarking output to categorize results by scenario and library, improving readability and organization of performance metrics.

Signed-off-by: francesco <francesco.bagnoli.69@gmail.com>
Signed-off-by: francesco <francesco.bagnoli.69@gmail.com>
@cesco69 cesco69 marked this pull request as draft January 16, 2026 16:35
Signed-off-by: francesco <francesco.bagnoli.69@gmail.com>
Signed-off-by: francesco <francesco.bagnoli.69@gmail.com>
@cesco69 cesco69 marked this pull request as ready for review January 16, 2026 16:43
Signed-off-by: francesco <francesco.bagnoli.69@gmail.com>
@cesco69

This comment was marked as resolved.

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.

2 participants