3 ms·
Minification helps the parser too, try running VS Code from sources and you’ll notice startup is significantly slower.
by jakear 4y ago
Minification helps the parser too, try running VS Code from sources and you’ll notice startup is significantly slower.
- shp0ngle 4y agohuh I would think there is no measurable difference there. However I honestly have no idea how much time does JS parser spends on what exactly. Are longer variable names and less tabs that big of a deal? It’s all in memory anyway, no… the lexer or tokenizer or whatever (…I never finished my compiler course…) just goes through that
- skohan 4y agoMy best guess is maybe faster hash-map lookups on variable names?
- jakear 4y agoWithout nonlinearities like optimization/type checking/etc, the runtime is basically just the time to loop through the bytes. Make the input a quarter the size and you have a quarter the bytes to loop through. College classes will say “oh it’s all O(N) anyways, no big deal”. Industry on the other hand says “why make tens of millions of people wait 4 seconds for this to start when we could make them wait 1 second just as easily”. The product’s source maps are publicly available in a way the debugger understands and the original code is freely accessible so there’s no real downside.