3 ms·
Well, V8 kinda barfs out native code too... I know it's not the same thing[1], but it's not like that to run a loop in Node.js the parser has to read the line "
by pooriaazimi 14y ago
Well, V8 kinda barfs out native code too... I know it's not the same thing[1], but it's not like that to run a loop in Node.js the parser has to read the line "console.log('hello');" 10 times, tokenize it, generate a parse tree, etc.
I just wanted to point it out because I think most people don't know about it, and that's why they are amazed at Node.js's speed (how can a interpreted language like JS be so fast?!).
[1]: It's definitely slower than native code generated by Erlang, I'm not saying it's faster or even on par; but still, it's much better than an interpreter! This StackOverflow answer is relevant: http://stackoverflow.com/a/4220550/347353 http://stackoverflow.com/a/4220550/347353
- davidw 14y agohttp://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php http://shootout.alioth.debian.org/u32/which-programming-lang... Actually does show V8 as being faster than Erlang's HiPE... I guess it pays off to have someone like Google sinking all that work into making things fast.
- pooriaazimi 14y agoYes. But let's hope that Go thing doesn't distract them...