Skip to content

Commit 92aaa90

Browse files
committed
feat(docs): readme - benchmark info
1 parent 95ba9f4 commit 92aaa90

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,61 @@ Output will be -
6767

6868
+ The function work recursively and sort all the inner json objects too.
6969

70+
### Benchmark
71+
* You can also run it on your machine
72+
* Clone project
73+
* `yarn install`
74+
* `yarn run benchmark`
75+
76+
Result from my machine :
77+
```
78+
=== Machine Details ===
79+
OS: Node.js 22.14.0 on Darwin 24.6.0
80+
CPU: Apple M1 Pro
81+
Memory: 16GB
82+
Node.js Version: 2.1.4
83+
=====================
84+
85+
86+
=== Shallow Objects ===
87+
88+
=== Benchmarking Sync Shallow small ===
89+
Shallow small x 4,575,482 ops/sec ±0.66% (94 runs sampled)
90+
91+
=== Benchmarking Sync Shallow medium ===
92+
Shallow medium x 79,882 ops/sec ±0.89% (96 runs sampled)
93+
94+
=== Benchmarking Sync Shallow large ===
95+
Shallow large x 2,439 ops/sec ±0.66% (99 runs sampled)
96+
97+
=== Nested Objects ===
98+
99+
=== Benchmarking Sync Nested small ===
100+
Nested small x 1,199,448 ops/sec ±0.26% (98 runs sampled)
101+
102+
=== Benchmarking Sync Nested medium ===
103+
Nested medium x 70,191 ops/sec ±1.12% (98 runs sampled)
104+
105+
=== Benchmarking Sync Nested large ===
106+
Nested large x 3,063 ops/sec ±3.19% (95 runs sampled)
107+
108+
=== Mixed Objects ===
109+
110+
=== Benchmarking Sync Mixed data ===
111+
Mixed data x 9,585 ops/sec ±0.74% (95 runs sampled)
112+
113+
=== Async Benchmarks ===
114+
115+
=== Benchmarking Async Large Shallow ===
116+
Large Shallow x 1,698 ops/sec ±0.27% (90 runs sampled)
117+
118+
=== Benchmarking Async Large Nested ===
119+
Large Nested x 1,002 ops/sec ±0.89% (87 runs sampled)
120+
121+
=== Benchmarking Async Mixed Data ===
122+
Mixed Data x 2,765 ops/sec ±1.35% (90 runs sampled)
123+
```
124+
70125
### Versions
71126
+ `v2.2.0`
72127
+ **sortAsync** : Implemented event loop yielding mechanism

0 commit comments

Comments
 (0)