Comment #2 on issue 1212 by [email protected]: Speedup invocation of
methods on primitive string values.
http://code.google.com/p/v8/issues/detail?id=1212
No. There is no interesting benchmark that depends on this. But I think
JavaScript developers do it quite often without expecting 100x penalty.
Here is another piece of information:
1) given strict mode support one can make String.prototype.a strict to
avoid creation of wrapper. This gives the following results:
76 // call with primitive receiver
112 // call with a new String object each iteration
10 // call with the same object receiver.
As you can see it's still roughly 8 times slower.
2) we are constantly hitting mark-compact in the first test case with
nonstrict function and primitive receiver because of
OldGenerationPromotionLimitReached() I did not look deeper but this does
not make sense --- there is nothing to meaningful to promote or pretenure
in the test case.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev