152kb WebAssembly interpreter that runs on six OSs with Cosmopolitan
github.com
github.com
It's a shame that I imagine OS vendors will find some fancy ways to make it at least annoying to use it, in at most a few years. I think it's already happening, with code signing/notarization.
So related to the whole https://justine.lol/ape.html crazy. Neat!
Does that mean browser engines?
However, I can’t find much actual qualitative performance comparison of Firefox (there’s a little more of V8).
A couple that I have found are https://www.usenix.org/conference/atc19/presentation/jangda (from almost two years ago), showing Firefox being about 20% faster than Chrome:
> Across the SPEC CPU suite of benchmarks, we find a substantial performance gap: applications compiled to WebAssembly run slower by an average of 45% (Firefox) to 55% (Chrome), with peak slowdowns of 2.08× (Firefox) and 2.5× (Chrome).
And https://github.com/wasm3/wasm3/blob/master/docs/Performance.... of CoreMark 1.0 (higher is better), showing Firefox being about 5% faster than Chromium:
Webassembly.sh (Chromium 78) 6914.325225 4.2x
Webassembly.sh (Firefox 70) 7251.153593 4.5xIf it's slow for other reasons, there'd be no clear correlation.
chmod +x wasm3-cosmopolitan.com
arch -x86_64 ./wasm3-cosmopolitan.com
and then go to preferences -> security -> run anyway, and then rerun it, then it works.[0] https://www.complang.tuwien.ac.at/anton/euroforth/ef13/paper...
But again, there might be complexity I'm missing.
https://github.com/wasm3/wasm3#motivation
Also, maybe the "Cosmopolitan platform abstraction" doesn't support mapping memory pages and making them executable, which would be required for a JIT (speculating, I haven't actually checked).
Write C, compile to a native binary to get maximum speed, compile to WebAssembly and get maximum portability.
For example the PG wasm extension has kinda stalled, I would love to be build binaries for execution as db triggers and target wasm.
Not at all. The whole idea is based on limiting your outlook to x86_64. So, Cosmopolitan is definitely cool, but a bit less cool than some people think.