3 ms·
I can't even think of a reason why a comment would cause a 10% speed reduction. Something has seriously gone very wrong there.
by dbbk 9y ago
I can't even think of a reason why a comment would cause a 10% speed reduction. Something has seriously gone very wrong there.
- sonthonax 9y agoAgreed. What the absolute hell? This entirely contradicts how I understand programming languages work. Whitespace, tokens, formatting, should be irrelevant once it's all in an AST.
- hdhzy 9y agoThis is just a simple heuristic that's good enough for real code on the web. Usually whitespace and comments are stripped out during build step. I imagine this heuristic was implemented as something simple and working and that's that. Remember that they are not writing a monument of perfect software but something pragmatic that should work good in most cases.