3 ms·
I've been poking at a C version of this (https://github.com/dan-eicher/javelina https://github.com/dan-eicher/javelina) which would be interesting to benchmark
by UncleEntity 1mo ago
I've been poking at a C version of this (https://github.com/dan-eicher/javelina https://github.com/dan-eicher/javelina) which would be interesting to benchmark against as it does a similar tail-calling dispatch mechanism. Plus copy-and-patch JIT but that probably only works on x86-64 as that's the only place I've ever tested it. The main differences from a brief skim of TFA is mine doesn't have any fallback (so non-tail calls will blow up the C stack) and the function calls always go through the trampoline so the VM doesn't have to care if it's calling JIT or interpreted code which, I'm assuming, your function pointer embedding thing is designed to optimize away.
And the JavaCard firewall algorithm would be an interesting non-spec addition to a wasm VM which is running code you really, really don't want to escape the sandbox. Something to look into for inspiration on the subject, perhaps? Not sure if there's any sort of proposal for sandboxing these things as I just took the spec file and implemented it using the dodgy weasels where it was mainly to see how far they've come with no real plan to use it for anything so kept it strictly to what the spec said a wasm interpreter needs to do.
Anyhoo, didn't really realize there were so many different projects doing the same thing, kind of interesting, actually...
- herobird 1mo agoCool project! If you think that your Wasm interpreter is stable and kinda production ready enough, you might want to file a PR to the wasmi-benchmarks repo to add support for your Wasm runtime. Would certainly be another great addition to have it. This would allow comparing your engine to all the others.