3 ms·
Suprised no one has posted https://blog.cloudflare.com/binary-ast/ https://blog.cloudflare.com/binary-ast/ . Its not bytecode but its still a great idea
by bepvte 7y ago
Suprised no one has posted https://blog.cloudflare.com/binary-ast/ https://blog.cloudflare.com/binary-ast/ . Its not bytecode but its still a great idea
- singularity2001 7y agoOh wow!! In a way it's even better than bytecode because it allows marking unused functions for lazy loading, giving speedups of 97% (in theoretical settings;) Must read. https://github.com/binast/binjs-ref https://github.com/binast/binjs-ref from below is part of this!
- kevingadd 7y agoWASM's (abandoned, because brotli is good enough) Binary Encoding proposal was essentially a binary AST compression system that worked for both JS trees (esprima) and wasm ASTs. You get pretty good improvements by converting ASTs into SoA representation, interleaving them, and then compressing them. Fast to decode, too. https://github.com/WebAssembly/design/issues/1180 https://github.com/WebAssembly/design/issues/1180