Use V8AtomicString for strings used as property keys.
V8 always internalizes strings when doing property lookup, so this can only save the work of heap-allocating a new string that will just be looked up later, and likely already exists in the internalized string table (e.g. because it is the key of a property, or because it occurs as a string literal). Found mainly by searching for string literals passed to V8String. Other similar cases may yet remain. No perf measurement was done, but this seems like it's easily the nicer thing to do in these cases. Change-Id: Idd645a83495f5ec1323f3ce87548d0f2a16aca19 Reviewed-on: https://chromium-review.googlesource.com/598540Reviewed-by:Kentaro Hara <haraken@chromium.org> Commit-Queue: Jeremy Roman <jbroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#491561}
Showing
Please register or sign in to comment