Commit Graph

6 Commits

Author SHA1 Message Date
Nathan Braswell
c6071dbbe1 bunch more testcases 2022-04-12 00:14:09 -04:00
Nathan Braswell
55afa8977e Add rust example 2022-04-11 16:07:11 -04:00
Nathan Braswell
1149363e62 Add debug_levels and turn off stack_traces by default, but save enough info about the last interaction with the top-level loop to enable re-running to problem spot with debugging on if it happens, and it works! This is the first step towards the opt/non-opt-wrap work while maintaining debugability 2022-04-09 00:45:58 -04:00
Nathan Braswell
b87afc6a12 Round allocated blocks up to the nearest 8 words, and split blocks that are >= 2x needed number of words. Now only allocates 1 wasm page for both compiled and interpreted versions at fib 30, a 269-538x improvement! 2022-03-30 21:27:01 -04:00
Nathan Braswell
b85873b240 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)
2022-03-29 23:49:51 -04:00
Nathan Braswell
eb3a732f99 Add fib_let test and script to run all of them. Indeed, the version with the let is worse when interpreted and the same/better when partially-evaled and compiled 2022-03-20 16:01:38 -04:00