csjh retweeted
#BREAKING: Trump says Canada becoming an EU associate member could be ‘hostile act.’ Live updates here. ctvnews.ca/politics/article/…
finally finished the blog post I've been working on for the past few months
goes over some fun bits I've picked out of the webassembly runtimes I've made over the last couple years
was a lot of fun to make, hope you enjoy
csjh.blog/posts/a-tale-of-th…
csjh retweeted
Here's a detailed write-up of how I optimized a super simple AST-walking dynamic language interpreter (for a language I invented).
It got 16x faster with ~20 changes. This puts it in the neighborhood of mature interpreters like CPython and QuickJS.
zef-lang.dev/implementation
made a silly little script for evaluating the branch predictor on my laptop
it lets you check how predictable some buffers of 0s and 1s by generating a copy of a branchy function and running through the buffer
doubt it's perfect but kinda cool
gist.github.com/csjh/2628d8b…
6
701
one cool thing about making a wasm jit is you can profile full codebases in any way you want (as long as they can compile to wasi)
over the last couple days i've looked at how branches behave relative to what stack history precedes them (i.e. how functionA's branches compare when called from functionB vs. when called from functionC), i've looked at how often memory accesses are predictable, i've looked at how often indirect branch addresses are predictable, etc etc etc
so cool
12
665
finally did full libsodium eval on various wasm runtimes
wasmer pretty good, but interestingly on my "real world" benchmark (compiling a big js file with esbuild) there's a significant perf difference (even after removing initialization time, <200ms) (some runtimes not listed because they crashed)
1
3
1,392
looked into this more... the go compiler wasm binary exclusively uses 1 param / 1 result function signatures, and never uses block result values! kinda wild
kinda interesting how different languages show themselves in wasm
i'm testing my jit for the first time on golang binaries and they have an order of magnitude more br_tables than my other llvm-compiled test binaries like figma/spidermonkey
1
2
571











