Comment #3 on issue 3144 by [email protected]: poor performance on
property lookup when the key is the result of a string concat
http://code.google.com/p/v8/issues/detail?id=3144
That being said, with *actual* cons strings (length >= 13) the performance
is still worse than normal string literals:
var key = "a very long concat " + "string";
gc(); gc();
var obj = {};
obj[key] = 1;
var t = 0;
var start = Date.now();
for (var i = 0; i < 10000000; i++) t += obj[key];
print(Date.now() - start);
Running that, I get 500ms, as opposed to 400ms with a non-cons-string. With
--nocrankshaft we get 690ms with that cons string.
The reason here is that when we internalize a cons string, the cons string
itself stays non-internalized, but the object property uses the
internalized version. So the next time we try to lookup the property using
the cons string, we still have to do the slow string comparison, since the
object property is using the internalized version.
Still marking as WAI since this is a corner case we don't think is worth
optimizing for.
--
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/groups/opt_out.