Comment #5 on issue 4165 by [email protected]: Functions assigned to object properties are pretenured
https://code.google.com/p/v8/issues/detail?id=4165

Again, the micro benchmark should not be given too much attention - it was there to allow you to quickly gauge the issue.

The above jade output on the other hand is very much a real-world example. As you fill it with more layout and html, the actual compiled function hardly changes, the only difference is that the pre-compiled strings become longer. In this environment, the difference between the naive version and the optimized is a performance differential of factor 3 - high enough that I spent several days drilling down to be able to report just a single microbenchmark.

So please don't dismiss this on the ground that someone saw something on jsperf and created an issue.

Getting back to the issue at hand, are you saying that we can't have both optimizations? To me it seemed as if v8 could be told to interpret

jade_mixins["print-thing"] = function(thing){

the same way it interprets

var jade_mixin_0;
jade_mixins["print-thing"] = jade_mixin_0 = function(thing){

I could not measure any difference in cpu or ram for this version, so why not use it all the time? It seems to get you both - the speed and the usage of objects. Is there something that I am missing?

--
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.

Reply via email to