Ah, the remaining calls were to =. Added 'inlining' the = and comp_helper loop into repeated calls to comp_helper_helper, eliminating the param array overhead. Now fib only allocates 10 times (instead of 4 million), and runs in .107s, finally beating Python handilly and becoming about 2x as slow as Chez. Feels like a decent spot for now, and that was most all of the low hanging fruit. The only thing left now is inlining of user functions to get fib_let performing as well - it looks glacial now at .4s because of the 2 remaining closure calls that the let expands to
This commit is contained in:
20
table.md
20
table.md
@@ -1,12 +1,12 @@
|
||||
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|
||||
|:---|---:|---:|---:|---:|
|
||||
| `echo 30 \| wasmtime ./fib_compiled.wasm` | 281.3 ± 4.3 | 274.3 | 289.5 | 24.35 ± 1.25 |
|
||||
| `echo 30 \| wasmtime ./fib_compiled_let.wasm` | 716.4 ± 52.4 | 692.3 | 862.6 | 62.00 ± 5.46 |
|
||||
| `echo 30 \| wasmtime ./builtin_fib.wasm` | 11.6 ± 0.6 | 10.3 | 13.2 | 1.00 |
|
||||
| `echo 30 \| wasmtime ./fib_compiled_manual.wasm` | 468.8 ± 4.1 | 462.5 | 477.2 | 40.57 ± 2.03 |
|
||||
| `scheme --script ./fib.scm 30` | 53.4 ± 0.8 | 52.2 | 57.4 | 4.62 ± 0.24 |
|
||||
| `scheme --script ./fib_let.scm 30` | 53.6 ± 0.9 | 52.4 | 56.7 | 4.64 ± 0.24 |
|
||||
| `python3 ./fib.py 30` | 284.7 ± 5.6 | 276.9 | 292.7 | 24.64 ± 1.30 |
|
||||
| `python3 ./fib_let.py 30` | 299.8 ± 5.3 | 291.5 | 304.7 | 25.94 ± 1.36 |
|
||||
| `echo 30 \| wasmtime ./rust_fib/target/wasm32-wasi/debug/rust_let.wasm` | 29.8 ± 0.7 | 28.7 | 32.5 | 2.58 ± 0.14 |
|
||||
| `echo 30 \| wasmtime ./rust_fib/target/wasm32-wasi/release/rust_let.wasm` | 18.5 ± 0.6 | 17.4 | 20.4 | 1.60 ± 0.09 |
|
||||
| `echo 30 \| wasmtime ./fib_compiled.wasm` | 107.5 ± 2.2 | 105.6 | 116.4 | 9.33 ± 0.51 |
|
||||
| `echo 30 \| wasmtime ./fib_compiled_let.wasm` | 469.3 ± 3.1 | 464.3 | 474.2 | 40.74 ± 2.08 |
|
||||
| `echo 30 \| wasmtime ./builtin_fib.wasm` | 11.5 ± 0.6 | 10.4 | 14.3 | 1.00 |
|
||||
| `echo 30 \| wasmtime ./fib_compiled_manual.wasm` | 292.5 ± 5.7 | 287.5 | 308.1 | 25.39 ± 1.38 |
|
||||
| `scheme --script ./fib.scm 30` | 54.6 ± 1.4 | 52.8 | 60.1 | 4.74 ± 0.27 |
|
||||
| `scheme --script ./fib_let.scm 30` | 53.7 ± 0.9 | 52.2 | 55.9 | 4.67 ± 0.25 |
|
||||
| `python3 ./fib.py 30` | 291.7 ± 3.7 | 286.0 | 296.9 | 25.32 ± 1.32 |
|
||||
| `python3 ./fib_let.py 30` | 303.7 ± 4.2 | 293.7 | 308.0 | 26.36 ± 1.38 |
|
||||
| `echo 30 \| wasmtime ./rust_fib/target/wasm32-wasi/debug/rust_let.wasm` | 29.6 ± 0.6 | 28.4 | 31.6 | 2.57 ± 0.14 |
|
||||
| `echo 30 \| wasmtime ./rust_fib/target/wasm32-wasi/release/rust_let.wasm` | 18.4 ± 0.5 | 17.3 | 20.0 | 1.59 ± 0.09 |
|
||||
|
||||
Reference in New Issue
Block a user