Re:A New Bytecode Format for JavaScriptCore
by olliej on Friday June 21, 2019 @04:14PM
(#20245937)
bin ast is/was an attempt to make a more compact version of JS that was easier to parse.
But parsing JS isn't a significant bottleneck, it's the subsequent work to produce the stuff that actually runs. IIRC proponents also claimed it meant you didn't have to worry as much about validation, which isn't true because it's untrusted content that comes from the internet. It must be validated.
binast also is not designed to be any more readily executable that JS - so even if it were supported step one would be "produce a bytecode that is fast".
But parsing JS isn't a significant bottleneck, it's the subsequent work to produce the stuff that actually runs. IIRC proponents also claimed it meant you didn't have to worry as much about validation, which isn't true because it's untrusted content that comes from the internet. It must be validated.
binast also is not designed to be any more readily executable that JS - so even if it were supported step one would be "produce a bytecode that is fast".