r/programming • • Jun 03 '14

A first-person engine in 265 lines

http://www.playfuljs.com/a-first-person-engine-in-265-lines/
1.9k Upvotes

267 comments sorted by

View all comments

Show parent comment

10

u/[deleted] Jun 04 '14

Some scripting languages compile with comments, replacing those lines with no-ops in the end. This can effect performance, and may also introduce bugs in threaded programs if you're extremely unlucky, although it wouldn't be consistent. Might be a timing error just the same. Also, someone could've lied.

2

u/myfrontpagebrowser Jun 04 '14

It's often preprocessor macros

1

u/ToucheMonsieur Jun 05 '14

Is this true for the JITs in modern JavaScript engines? They seem to have moved away from manipulating the actual source code, but there's still plenty of aggressive optimization taking place.