I literally had to optimize a piece of JavaScript code today that was trying to set the state of a grid of 128x128 elements _once_, something that you wouldn't even think about in C, but which took _two seconds_ to do in JavaScript because it is amazing and wonderful.
-
-
... but in JavaScript, it has no idea what that line means, because it doesn't even know what "elem" is. So the JITs have to resort to heroics where they try to analyze the code to figure out what can be safely turned into fast operations, and what can't.
-
A sane scripting language knows this and designs in the minimal amount of "typing" necessary to ensure that you can still have easy-to-read things that a user types, but that the compiler can know definitively what they do. JavaScript fails completely here.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.