Fixed a terrible bug where turns out I used the same name for a block and a parameter in the comparison meta-function -
they share the same namespace in the wasm DSL, so when I used it like a parameter in a loop it resolved to the number of scopes between the statement and the block'th parameter which had the same type and the calculation worked fine, but it overwrote the parameter I thought wasn't being used and called a function later with. Also, that seemed like that last of the really bad leaks & corruption, so re-enabling the freelist and am able to run some less-trivial benchmarks, namely (fib 30)! The compiled version is between 4.7x and 65x slower than Python, depending on if you're using wasmer, wasmtime, wasm3. Would like to try WAVM as well. A solid place to start, I think, and hopefully we'll be faster than Python once I implement a variety of dont-be-dumb optimizations (real-er malloc, static calls of statically known functions, etc)
This commit is contained in:
18
fib_tests.sh
18
fib_tests.sh
@@ -1,17 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
NUMBER=11
|
||||
NUMBER=30
|
||||
|
||||
echo "Compile Straight"
|
||||
touch csc_out.wasm && rm csc_out.wasm && scheme --script ./partial_eval.scm fib.kp && time echo $NUMBER | wasm3 ./csc_out.wasm
|
||||
#touch csc_out.wasm && rm csc_out.wasm && scheme --script ./partial_eval.scm fib.kp && time echo $NUMBER | wasm3 ./csc_out.wasm
|
||||
#touch csc_out.wasm && rm csc_out.wasm && scheme --script ./partial_eval.scm fib.kp && time echo $NUMBER | wasmtime ./csc_out.wasm
|
||||
touch csc_out.wasm && rm csc_out.wasm && scheme --script ./partial_eval.scm fib.kp && time echo $NUMBER | wasmer ./csc_out.wasm
|
||||
|
||||
echo "Interpret Straight"
|
||||
touch csc_out.wasm && rm csc_out.wasm && scheme --script ./partial_eval.scm fib.kp no_compile && time echo $NUMBER | wasm3 ./csc_out.wasm
|
||||
#echo "Interpret Straight"
|
||||
#touch csc_out.wasm && rm csc_out.wasm && scheme --script ./partial_eval.scm fib.kp no_compile && time echo $NUMBER | wasm3 ./csc_out.wasm
|
||||
|
||||
echo "Compile Let"
|
||||
touch csc_out.wasm && rm csc_out.wasm && scheme --script ./partial_eval.scm fib_let.kp && time echo $NUMBER | wasm3 ./csc_out.wasm
|
||||
#echo "Compile Let"
|
||||
#touch csc_out.wasm && rm csc_out.wasm && scheme --script ./partial_eval.scm fib_let.kp && time echo $NUMBER | wasm3 ./csc_out.wasm
|
||||
|
||||
echo "Interpret Let"
|
||||
touch csc_out.wasm && rm csc_out.wasm && scheme --script ./partial_eval.scm fib_let.kp no_compile && time echo $NUMBER | wasm3 ./csc_out.wasm
|
||||
#echo "Interpret Let"
|
||||
#touch csc_out.wasm && rm csc_out.wasm && scheme --script ./partial_eval.scm fib_let.kp no_compile && time echo $NUMBER | wasm3 ./csc_out.wasm
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user