Status: Untriaged
Owner: ----
New issue 4165 by [email protected]: Slow creation of objects of
functions
https://code.google.com/p/v8/issues/detail?id=4165
Building on my performance benchmarking of jade that already yielded
https://code.google.com/p/v8/issues/detail?id=4121, I have found another
very strange behaviour: http://jsperf.com/iterative-function-creation
Basically, running
var obj = {}; obj.a = function() {};
is very slow, but
var obj = {}; var b = function() {}; obj.a = b;
is very fast. Which is weird because, strictly logically, it does more than
the above line (it declares an additional variable). My suspicion is that
there are some optimizations going on in the background that pull b =
function(){} out of the for loop which don't apply for obj.a = function(){}.
Of course, this example is extremely simplified. In the wild, this bites
jade because with each run, it builds an object called jade_mixins to store
each of its mixins, making the execution surprisingly slow.
Cycling through different versions of node and iojs, I could not find a
version of v8 that is not affected.
It would be great if both could yield the same performance (as they do in
Firefox).
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.