Well, sounds great that tools come together to spec an AST. Not exactly sure why the browser needs to get involved :-)
-
-
Replying to @tverwaes @mikesherov and
Well browser can be involved if it chooses too. This is meant as a transparent mechanism that any tools can benefit from if they opt-in.
1 reply 0 retweets 0 likes -
Replying to @RReverser @tverwaes and
While it might not give you much on the desktop, I can totally see a low-end phone taking advantage of binary format to make parsing cheaper both in terms of speed and RAM.
1 reply 0 retweets 1 like -
Replying to @RReverser @tverwaes and
And JS has enough complexities in the grammar to make the difference sometimes quite significant in constrained environment.
1 reply 0 retweets 0 likes -
Replying to @RReverser @mikesherov and
I very much doubt that. V8 is fast at parsing JS. The higher the information density, the lower parse-speed. Properly minified code still parses much faster than most network speeds even on low-end. You'll save tiny fractions of parse (cold load) time at most.
1 reply 0 retweets 2 likes -
Replying to @tverwaes @mikesherov and
If only all code out there was properly minified (lots of code we're seeing out there is not, that's something that surprised me when I joined and to this day)... Anyway, I guess we'll see. No point in arguing about this now, before the experiment is up and running :)
1 reply 0 retweets 4 likes -
Replying to @RReverser @mikesherov and
Actually I typically check parse speed compared to brotli compressed source, which avoids the discussion of minification. V8 on desktop parses at over 12MB/s compared to minified source. That's 40-80MB/s unminified.
1 reply 0 retweets 2 likes -
Replying to @tverwaes @RReverser and
I meant 12MB/s compared to compressed source rather than minified source, of course.
1 reply 0 retweets 0 likes -
Replying to @tverwaes @RReverser and
So basically we make up for missing minification by parsing faster. Also interesting that proponents of BinAST always bring up sites that don't use tools. Why would they BinAST?... :-)
1 reply 0 retweets 0 likes -
Replying to @tverwaes @mikesherov and
They wouldn't, most users don't care about best practices unfortunately. But if various optimisations are done transparently at a CDN level... *wink* *wink*
2 replies 0 retweets 5 likes
CDNs could also minify JS (and good ones like Cloudflare have options to do so!).
-
-
Oh yeah I know they can and do (guess who wrote the current implementation :P). But, unfortunately, we need to be extra-careful and don't do as much as proper minifier would.
1 reply 0 retweets 2 likes -
Replying to @RReverser @mathias and
BAST, on the other hand, offers opportunity to preserve semantics of JS as-is, without mangling variables or anything. The only thing it currently can break is Function::toString, but that's to be fixed too.
1 reply 0 retweets 1 like - 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.