3 ms·
Yoric - the Binary AST size comparisons in the blog - was the original javascript already minified?
by malts 9y ago
Yoric - the Binary AST size comparisons in the blog - was the original javascript already minified?
- Yoric 9y agoOn our sample, x0.95 for minified code (so that's a 5% improvement) and ~x0.3 for non-minified code. As usual, read these numbers with a pinch of salt, they are bound to change many times before we are done.
- malts 9y agoDoes BinJS perform AST transforms like `!0` to `true` which would be shorter in binary AST encoding? Or does it faithfully model the original code?
- Yoric 9y agoIt faithfully models the original code. The idea is that if you want to transform `!0` to `true`, or if you want to obfuscate, etc. you can always plug an additional tool.
- malts 9y agoThe 5% gains over minified code are impressive given that BinJS performs no AST manipulation. The BinJS prototype will be written in pure javascript I assume to speed its adoption?
- Yoric 9y agoFor the moment, it's JS + Rust, because Rust is better than JS when you keep refactoring Big Hairy Data Structures. However, once the data structures stabilize we're planning to shift it entirely to JS.