In newer versions of the V8 engine the global opt is not de-optimized.
Thanks for testing! -sorenso-
And maybe a way to get the results would help you see differences between machines and platforms.
On a daily basis I'm working on web applications with more than 5000 req/sec, so it's important to make sure your code performs.
From the page:
Result Node.js v0.12.0
Called v2, util.yo("man") 100.000.000.000 times in 120.849870219 sec (1.00 x slower than v3)
Called v3, util.yo("man") 100.000.000.000 times in 120.432087601 sec
It should have said "1.00 x the speed of v3". I'll change the text in my next run of this.
I'm currently working on a new benchmark test of promises and callbacks. All in the name of performance :)
I know, but this is still a common way of making objects. I've seen it several times, but I don't like it ;)
-sorenso-
I started using Node for some things where PHP feels inadequate (async network requests), and overall I'm happy with the speed, but after years of PHP it's been rough figuring out the right way to do objects. I don't need nearly this many requests, but I find it useful to internalize micro-optimizations to make your code a speed demon
It's good to start with a solid module boilerplate, but you should always consider readability before performance if you don't need the performance.
Code maintenance is important :)
-sorenso-
I've checked and console.log is not there in the code I ran in my benchmark. I re-ran the tests right now to make sure I didn't screw up this.
Best regards, -sorenso-
I'll then present the results on a nice webpage :)