News for hackers. Stuff that matters.
Re:Node 8.3.0 released by nessup on Thursday August 10, 2017 @05:14PM (#14984349)
From the Medium post about speed improvements in this version:

> The size of a function, including it’s signature, the white space and even comments can affect whether the function can be inlined by V8 or not. Yes: adding a comment to your function may cause a performance hit somewhere in the range of a 10% speed reduction.

Uhh... byeee

Re:Node 8.3.0 released by dbbk on Friday August 11, 2017 @09:40AM (#14989522)
I can't even think of a reason why a comment would cause a 10% speed reduction. Something has seriously gone very wrong there.
Re:Node 8.3.0 released by sonthonax on Friday August 11, 2017 @11:06AM (#14990386)
Agreed. 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.
Re:Node 8.3.0 released by hdhzy on Friday August 11, 2017 @02:16PM (#14992700)
This 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.