Bug 92486 - [JSC] JSC should use AtomicStrings to make Element::getAttributeNS() faster
Summary: [JSC] JSC should use AtomicStrings to make Element::getAttributeNS() faster
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 99118
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-27 03:41 PDT by Kentaro Hara
Modified: 2012-10-11 18:51 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kentaro Hara 2012-07-27 03:41:13 PDT
Assume Node::foo(AtomicString& str). Assume JavaScript calls node.foo("bar").

[V8] V8 can cache both Strings and AtomicStrings. "bar" is cached as an AtomicString. When node.foo("bar") is called, the cached AtomicString is passed to Node::foo(). Very efficient.

[JSC] JSC can cache Strings but cannot cache AtomicStrings. "bar" is cached as a String. When node.foo("bar") is called, the cached String has to be converted to AtomicString and then passed to Node::foo().

For more details, please refer to Comment #0 of bug 90276.
Comment 1 Geoffrey Garen 2012-07-27 08:34:21 PDT
"Cache" is the wrong term for what happens when JSC passes a string to WebCore. JSC already has a StringImpl*, and it passes that to WebCore.

The issue here is that "foo" is in the Identifier table but not the AtomicString table. One way to fix this is to merge the tables.
Comment 2 Eric Seidel (no email) 2012-10-11 18:50:12 PDT
I believe bug 99118 and this are the same bug?