@@ -6,90 +6,80 @@ seem to like them, so here's a few:
66<h3 >Method Call</h3 >
77<table class =" chart " >
88 <tr >
9- <th>wren </th><td><div class="chart-bar wren" style="width: 14 %;">0.12s </div></td>
9+ <th>wren0.4 </th><td><div class="chart-bar wren" style="width: 46 %;">0.079s </div></td>
1010 </tr >
1111 <tr >
12- <th>luajit ( -joff) </th><td><div class="chart-bar" style="width: 18 %;">0.16s </div></td>
12+ <th>luajit2.1 -joff</th><td><div class="chart-bar" style="width: 53 %;">0.091s </div></td>
1313 </tr >
1414 <tr >
15- <th>ruby </th><td><div class="chart-bar" style="width: 23 %;">0.20s </div></td>
15+ <th>ruby3.0 </th><td><div class="chart-bar" style="width: 61 %;">0.104s </div></td>
1616 </tr >
1717 <tr >
18- <th>lua </th><td><div class="chart-bar" style="width: 41 %;">0.35s </div></td>
18+ <th>lua5.4 </th><td><div class="chart-bar" style="width: 71 %;">0.121s </div></td>
1919 </tr >
2020 <tr >
21- <th>python3</th><td><div class="chart-bar" style="width: 91%;">0.78s </div></td>
22- </tr >
23- <tr >
24- <th>python</th><td><div class="chart-bar" style="width: 100%;">0.85s </div></td>
21+ <th>python3.11</th><td><div class="chart-bar" style="width: 100%;">0.171s </div></td>
2522 </tr >
2623</table >
27- <h3 >DeltaBlue</h3 >
24+
25+ <h3 >Delta Blue</h3 >
2826<table class =" chart " >
2927 <tr >
30- <th>wren </th><td><div class="chart-bar wren" style="width: 22 %;">0.13s </div></td>
28+ <th>wren0.4 </th><td><div class="chart-bar wren" style="width: 81 %;">0.086s </div></td>
3129 </tr >
3230 <tr >
33- <th>python3</th><td><div class="chart-bar" style="width: 83%;">0.48s </div></td>
34- </tr >
35- <tr >
36- <th>python</th><td><div class="chart-bar" style="width: 100%;">0.57s </div></td>
31+ <th>python3.11</th><td><div class="chart-bar" style="width: 100%;">0.107s </div></td>
3732 </tr >
3833</table >
34+
3935<h3 >Binary Trees</h3 >
4036<table class =" chart " >
4137 <tr >
42- <th>luajit ( -joff) </th><td><div class="chart-bar" style="width: 20 %;">0.11s </div></td>
38+ <th>luajit2.1 -joff</th><td><div class="chart-bar" style="width: 52 %;">0.074s </div></td>
4339 </tr >
4440 <tr >
45- <th>wren </th><td><div class="chart-bar wren " style="width: 41 %;">0.22s </div></td>
41+ <th>ruby3.0 </th><td><div class="chart-bar" style="width: 82 %;">0.116s </div></td>
4642 </tr >
4743 <tr >
48- <th>ruby </th><td><div class="chart-bar" style="width: 46 %;">0.24s </div></td>
44+ <th>python3.11 </th><td><div class="chart-bar" style="width: 97 %;">0.137s </div></td>
4945 </tr >
5046 <tr >
51- <th>python </th><td><div class="chart-bar" style="width: 71 %;">0.37s </div></td>
47+ <th>lua5.4 </th><td><div class="chart-bar" style="width: 98 %;">0.139s </div></td>
5248 </tr >
5349 <tr >
54- <th>python3</th><td><div class="chart-bar" style="width: 73%;">0.38s </div></td>
55- </tr >
56- <tr >
57- <th>lua</th><td><div class="chart-bar" style="width: 100%;">0.52s </div></td>
50+ <th>wren0.4</th><td><div class="chart-bar wren" style="width: 100%;">0.141s </div></td>
5851 </tr >
5952</table >
53+
6054<h3 >Recursive Fibonacci</h3 >
6155<table class =" chart " >
6256 <tr >
63- <th>luajit ( -joff) </th><td><div class="chart-bar" style="width: 17 %;">0.10s </div></td>
57+ <th>luajit2.1 -joff</th><td><div class="chart-bar" style="width: 35 %;">0.055s </div></td>
6458 </tr >
6559 <tr >
66- <th>wren </th><td><div class="chart-bar wren " style="width: 35 %;">0.20s </div></td>
60+ <th>lua5.4 </th><td><div class="chart-bar" style="width: 55 %;">0.087s </div></td>
6761 </tr >
6862 <tr >
69- <th>ruby </th><td><div class="chart-bar" style="width: 39 %;">0.22s </div></td>
63+ <th>ruby3.0 </th><td><div class="chart-bar" style="width: 76 %;">0.119s </div></td>
7064 </tr >
7165 <tr >
72- <th>lua </th><td><div class="chart-bar" style="width: 49 %;">0.28s </div></td>
66+ <th>wren0.4 </th><td><div class="chart-bar wren " style="width: 95 %;">0.148s </div></td>
7367 </tr >
7468 <tr >
75- <th>python</th><td><div class="chart-bar" style="width: 90%;">0.51s </div></td>
76- </tr >
77- <tr >
78- <th>python3</th><td><div class="chart-bar" style="width: 100%;">0.57s </div></td>
69+ <th>python3.11</th><td><div class="chart-bar" style="width: 100%;">0.156s </div></td>
7970 </tr >
8071</table >
8172
82- ** Shorter bars are better.** Each benchmark is run ten times and the best time
83- is kept. It only measures the time taken to execute the benchmarked code
84- itself, not interpreter startup.
85-
86- These were run on my MacBook Pro 2.3 GHz Intel Core i7 with 16 GB of 1,600 MHz
87- DDR3 RAM. Tested against Lua 5.2.3, LuaJIT 2.0.2, Python 2.7.5, Python 3.3.4,
88- ruby 2.0.0p247. LuaJIT is run with the JIT * disabled* (i.e. in bytecode
89- interpreter mode) since I want to support platforms where JIT-compilation is
90- disallowed. LuaJIT with the JIT enabled is * much* faster than all of the other
91- languages benchmarked, including Wren, because Mike Pall is a robot from the
92- future.
73+ ** Shorter bars are better.** Each benchmark is run ten times and the median
74+ time is calculated. It only measures the time taken to execute the benchmarked
75+ code itself, not interpreter startup.
76+
77+ These were run on a machine with an AMD Ryzen 9 5950X processor. Tested
78+ against Lua 5.4.4, LuaJIT 2.1.0-beta3, Python 3.11.3, ruby 3.0.5. LuaJIT is
79+ run with the JIT * disabled* (i.e. in bytecode interpreter mode) since I want
80+ to support platforms where JIT-compilation is disallowed. LuaJIT with the JIT
81+ enabled is * much* faster than all of the other languages benchmarked,
82+ including Wren, because Mike Pall is a robot from the future.
9383
9484The benchmark harness and programs are
9585[ here] ( https://github.com/wren-lang/wren/tree/main/test/benchmark ) .
0 commit comments