Skip to content

Commit 7c123fc

Browse files
committed
fix: update benchmark results
1 parent f769c3a commit 7c123fc

File tree

1 file changed

+25
-47
lines changed

1 file changed

+25
-47
lines changed

README.md

Lines changed: 25 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -47,55 +47,33 @@ QJS allows you to run JavaScript code safely and efficiently, with full support
4747

4848
Computing factorial(10) 1,000,000 times
4949

50-
| Ite | Engine | Duration | Memory | Allocations | Frees | Heap Alloc | Heap Objects |
51-
|-----|--------|---------------|---------------|-------------|-------|------------|--------------|
52-
| 1 | Goja | 1.036s | 91.6 MB | 7.0M | 7.0M | 575.4 KB | 24.3K |
53-
| | QJS | **695.809ms** | **992.3 KB** | **1.5K** | 34 | 992.3 KB | 1.4K |
54-
| | | | | | | | |
55-
| 2 | Goja | 1.052s | 91.6 MB | 7.0M | 6.9M | 2.4 MB | 105.8K |
56-
| | QJS | **701.243ms** | **992.3 KB** | **1.5K** | 34 | 992.3 KB | 1.4K |
57-
| | | | | | | | |
58-
| 3 | Goja | 1.061s | 91.6 MB | 7.0M | 6.9M | 2.4 MB | 103.3K |
59-
| | QJS | **696.371ms** | **993.1 KB** | **1.5K** | 34 | 993.1 KB | 1.4K |
60-
| | | | | | | | |
61-
| 4 | Goja | 1.061s | 91.6 MB | 7.0M | 7.0M | 1.1 MB | 48.5K |
62-
| | QJS | **699.354ms** | **1001.6 KB** | **1.5K** | 34 | 1001.6 KB | 1.4K |
63-
| | | | | | | | |
64-
| 5 | Goja | 1.060s | 91.6 MB | 7.0M | 7.0M | 1.1 MB | 47.2K |
65-
| | QJS | **702.952ms** | **992.3 KB** | **1.5K** | 34 | 992.3 KB | 1.4K |
66-
|-----|--------|---------------|---------------|-------------|-------|------------|--------------|
67-
| Avg | Goja | 1.054s | 91.6 MB | 7.0M | 6.9M | 1.5 MB | 65.8K |
68-
| | QJS | **699.146ms** | **994.3 KB** | **1.5K** | 34 | 994.3 KB | 1.4K |
69-
70-
**Performance Comparison**
71-
- **Time**: QJS is **1.51x faster** than Goja.
72-
- **Memory**: QJS uses **94.30x less** memory than Goja.
73-
74-
**Total Execution Times**
75-
- **Goja**: 5.271594245s (mem: 457.8 MB).
76-
- **QJS**: 3.495730965s (mem: 4.9 MB).
77-
78-
**About QJS WebAssembly**
79-
- QJS runs via WASM (Wazero runtime).
80-
- Allocations/Frees/Objects metrics show Go-level only because WASM-internal allocations are not visible to Go runtime.
81-
- Memory usage is accurate for both engines.
50+
| Iteration | GOJA | ModerncQuickJS | QJS |
51+
| --- | --- | --- | --- |
52+
| 1 | 1.128s | 1.897s | 737.635ms |
53+
| 2 | 1.134s | 1.936s | 742.670ms |
54+
| 3 | 1.123s | 1.898s | 738.737ms |
55+
| 4 | 1.120s | 1.900s | 754.692ms |
56+
| 5 | 1.132s | 1.918s | 756.924ms |
57+
| Average | 1.127s | 1.910s | **746.132ms** |
58+
| Total | 5.637s | 9.549s | **3.731s** |
59+
| Speed | 1.51x | 2.56x | 1.00x |
60+
61+
*Benchmarks run on AMD Ryzen 7 7840HS, 32GB RAM, Linux*
8262

8363
### AreWeFastYet V8-V7
84-
| Metric | qjs | goja |
85-
|---------------|-------------|-----------|
86-
| Version | latest | latest |
87-
| Exe size | **8.5 MB** | 13.2 MB |
88-
| Richards | **431** | 365 |
89-
| DeltaBlue | **445** | 385 |
90-
| Crypto | **383** | 187 |
91-
| RayTrace | **503** | 335 |
92-
| EarleyBoyer | **816** | 694 |
93-
| RegExp | 135 | **306** |
94-
| Splay | **1190** | 786 |
95-
| NavierStokes | **639** | 292 |
96-
| Score | **486** | 379 |
97-
| Score/MB | **57** | 28 |
98-
| Time(s) | **73** | 84 |
64+
65+
| Metric | GOJA | ModerncQuickJS | QJS |
66+
| --- | --- | --- | --- |
67+
| Richards | 345 | 189 | **434** |
68+
| DeltaBlue | 411 | 205 | **451** |
69+
| Crypto | 203 | 305 | **393** |
70+
| RayTrace | 404 | 347 | **488** |
71+
| EarleyBoyer | 779 | 531 | **852** |
72+
| RegExp | **381** | 145 | 142 |
73+
| Splay | 1289 | 856 | **1408** |
74+
| NavierStokes | 324 | 436 | **588** |
75+
| Score (version 7) | 442 | 323 | **498** |
76+
| Duration (seconds) | 78.349s | 97.240s | **72.004s** |
9977

10078
*Benchmarks run on AMD Ryzen 7 7840HS, 32GB RAM, Linux*
10179

0 commit comments

Comments
 (0)