Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What implementations actually do in code is almost always very different from what the specification wording suggests. For example, in V8 the handling of a line terminator used as a semicolon is practically the same had you used a semicolon as you can see here:

https://code.google.com/p/v8/source/browse/trunk/src/prepars...

Furthermore, parsing source text initially into a representation that can be worked with is like 0.000001% of the total work to be done. And it is cached too.

Another example is in PHP where you can open and close <?php ?> tags as many times as you like and it will perform exactly the same compared to equal code with single open and close tag. Especially if you use PHP opcode caching where the source text is not even used for subsequent requests.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: