You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-29Lines changed: 6 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,41 +127,18 @@ The project is continuously validated against the official Lua 5.5 test suite. T
127
127
./run_benchmarks.sh
128
128
```
129
129
130
-
The benchmark scripts cover arithmetic, control flow, coroutines, functions, iterators, metatables, strings, tables, and more. The README snapshot below comes from `run_benchmarks.ps1` on Windows with a Ryzen 7 5800X, comparing luars against native Lua 5.5 on the same machine.
130
+
The benchmark scripts cover arithmetic, control flow, coroutines, functions, iterators, metatables, strings, tables, and more. The Windows snapshot linked below comes from `run_benchmarks.ps1` on Windows with a Ryzen 7 5800X, comparing luars against native Lua 5.5 on the same machine.
131
131
132
-
On this project, Linux results are typically about 10% lower than the Windows snapshot below, while macOS tends to perform better on most workloads.
132
+
On this project, Linux results are typically about 10% lower than the Windows snapshot, while macOS tends to perform better on most workloads.
133
133
134
134
### Benchmark Snapshot
135
135
136
-
The chart below is a script-level summary from the current Windows run of `run_benchmarks.ps1`. Values are shown as `luars / native Lua * 100`, so `100` means parity with native Lua, `120` means luars is about 20% faster, and `80` means it is about 20% slower.
136
+
The platform snapshots now live in dedicated documents:
137
137
138
-
```mermaid
139
-
xychart-beta
140
-
title "luars vs native Lua 5.5 on Windows (Ryzen 7 5800X)"
-[windows.md](docs/benchmarks/windows.md): the Windows snapshot with Ryzen 7 5800X
139
+
-[macos.md](docs/benchmarks/macos.md): the macOS snapshot with an Apple M4 by @Bruce
146
140
147
-
| Script | Relative throughput |
148
-
|--------|---------------------|
149
-
|`bench_arithmetic.lua`| 111% |
150
-
|`bench_control_flow.lua`| 87% |
151
-
|`bench_locals.lua`| 132% |
152
-
|`bench_functions.lua`| 92% |
153
-
|`bench_closures.lua`| 80% |
154
-
|`bench_multiret.lua`| 78% |
155
-
|`bench_tables.lua`| 92% |
156
-
|`bench_table_lib.lua`| 118% |
157
-
|`bench_iterators.lua`| 93% |
158
-
|`bench_math.lua`| 98% |
159
-
|`bench_metatables.lua`| 78% |
160
-
|`bench_oop.lua`| 92% |
161
-
|`bench_coroutines.lua`| 152% |
162
-
|`bench_errors.lua`| 103% |
163
-
164
-
String-heavy microbenchmarks are intentionally left out of the chart because several subtests complete too quickly on Windows timer resolution, which can produce distorted summary ratios. For full raw output, run `run_benchmarks.ps1` directly and inspect the per-subtest numbers.
141
+
If you want the raw terminal output instead of the summarized charts, run `run_benchmarks.ps1` on Windows or `./run_benchmarks.sh` on macOS/Linux and inspect the per-subtest numbers directly.
- The strongest macOS win in this run is `bench_table_lib.lua`, mainly because `table.insert`, `table.remove`, `table.sort`, and `table.move` all outperform native Lua by a large margin in the raw run.
45
+
-`bench_control_flow.lua`, `bench_locals.lua`, `bench_tables.lua`, and `bench_math.lua` also show broad wins across most subtests.
46
+
-`bench_closures.lua` is effectively at parity in this run.
- This is a script-level summary from the current Windows run of `run_benchmarks.ps1`.
45
+
- String-heavy microbenchmarks are intentionally left out of the chart because several subtests complete too quickly on Windows timer resolution, which can distort summary ratios.
46
+
- For full raw output, run `run_benchmarks.ps1` directly and inspect the per-subtest numbers.
0 commit comments