3 ms·
Your first point is particularly interesting to me. It was my understanding that Javascript was impossibly slow at a few very key operations, like array lookup
by jo_ 12y ago
Your first point is particularly interesting to me. It was my understanding that Javascript was impossibly slow at a few very key operations, like array lookups. (Since it didn't have true numerically backed arrays and instead did hashtable lookups for those types of arrays.) C should be blowing away Javascript in pure array lookups. I'm astonished it's not. What do you suspect is the cause of that?
- lucian1900 12y agoPerhaps you misread. C most likely is, or at least more reliably. JS engines specialise to proper arrays most of the time, though. They're quite remarkably fast, much like PyPy. CPython, the original Python interpreter written in C, is not particularly fast at anything.