Comment #7 on issue 2734 by [email protected]: StringDictionary store is very slow
http://code.google.com/p/v8/issues/detail?id=2734

Those load and store ICs go generic since there are lots of keys coming in.

The generic store IC only supports smi-key based generic stores inline, for everything else it goes to the runtime.

The generic load IC does directly support unique strings for both fast-mode objects and dictionaries.

Crankshaft currently doesn't support loads/stores for dictionary maps at all. Hence they all just go generic (behave identical to the ICs).

This information combined makes the numbers make a lot of sense:
loop1 does 4 accesses (2 loads, 2 stores)
loop2 does 2 accesses (1 load, 1 store) and is double as fast as loop1
loop3 generally only does 1 load; which is handled directly by the IC; so is a lot faster than loop2.

The first thing we could do is implement a better KeyedStoreIC for the generic case, that also handles named access. That way we at least avoid going to the runtime; and, I estimate, should double speed of loop1/2.

Then we could better support keyed access in hydrogen:
* I presume we'd have to have a specific non-generic IC to track this use-case of accessing objects (and dictionary-mode objects) with multiple string keys. * We'd have to not go polymorphic when overwriting a non-normal version of such IC with a normal version; since I presume the object is first non-dictionary but then transitions to dictionary mode. * We probably need a dictionary access implementation in hydrogen that, as Slava mentioned, first fetches the offset of the element in the dictionary, and then loads from it or stores to it (if it's already there); so that we can GVN to optimize this code. * We probably want to rewrite the keyed stubs in hydrogen rather than doing this work manually for all platforms; and inline their implementation later on.

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


Reply via email to