Status: New
Owner: ----

New issue 2321 by [email protected]: Math.pow(10,1) / 100 ridiculously slow (only) on nodejs
http://code.google.com/p/v8/issues/detail?id=2321

Division with a result of Math.pow cripples performance. However if I add + 0 to the result of Math.pow, it's okay again. This only happens in nodejs v0.8.4. in chrome browser it's fine.

$ node
measure = function (fn) {now = new Date(); i = 1000000; while (i--) { fn() }; console.log((new Date() - now) / 1000) }

measure(function() {  Math.pow(10,2) / 100      })
// => 0.631s

// Quickfix:
measure(function() { (Math.pow(10,2) + 0) / 100 })
// => 0.014s

Issue on nodejs
https://github.com/joyent/node/issues/3973#issuecomment-8328364

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to