WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
131923
Speed up jsStringWithCache() through WeakGCMap inlining.
https://bugs.webkit.org/show_bug.cgi?id=131923
Summary
Speed up jsStringWithCache() through WeakGCMap inlining.
Andreas Kling
Reported
2014-04-20 20:28:39 PDT
Speed up jsStringWithCache() through WeakGCMap inlining.
Attachments
Patch
(9.44 KB, patch)
2014-04-20 20:33 PDT
,
Andreas Kling
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Andreas Kling
Comment 1
2014-04-20 20:33:16 PDT
Created
attachment 229780
[details]
Patch
Darin Adler
Comment 2
2014-04-20 20:40:04 PDT
Comment on
attachment 229780
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=229780&action=review
> Source/WebCore/bindings/js/JSDOMBinding.cpp:66 > +JSC::JSValue jsStringWithCache(JSC::ExecState* exec, const String& s)
rename s to string?
> Source/WebCore/bindings/js/JSDOMBinding.cpp:81 > + JSStringCache& stringCache = currentWorld(exec).m_stringCache; > + JSStringCache::AddResult addResult = stringCache.add(stringImpl, nullptr);
I suggest using auto. I also suggest getting rid of the stringCache local variable.
> Source/WebCore/bindings/js/JSDOMBinding.cpp:83 > + addResult.iterator->value = JSC::jsString(exec, String(stringImpl));
Seems a shame to do String(stringImpl) here instead of just using "s"
Andreas Kling
Comment 3
2014-04-20 20:54:40 PDT
(In reply to
comment #2
)
> (From update of
attachment 229780
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=229780&action=review
> > > Source/WebCore/bindings/js/JSDOMBinding.cpp:66 > > +JSC::JSValue jsStringWithCache(JSC::ExecState* exec, const String& s) > > rename s to string? > > > Source/WebCore/bindings/js/JSDOMBinding.cpp:81 > > + JSStringCache& stringCache = currentWorld(exec).m_stringCache; > > + JSStringCache::AddResult addResult = stringCache.add(stringImpl, nullptr); > > I suggest using auto. I also suggest getting rid of the stringCache local variable. > > > Source/WebCore/bindings/js/JSDOMBinding.cpp:83 > > + addResult.iterator->value = JSC::jsString(exec, String(stringImpl)); > > Seems a shame to do String(stringImpl) here instead of just using "s"
I'll get rid of the ref count churn here shortly. Will pretty up the names then too.
WebKit Commit Bot
Comment 4
2014-04-20 21:19:35 PDT
Comment on
attachment 229780
[details]
Patch Clearing flags on attachment: 229780 Committed
r167577
: <
http://trac.webkit.org/changeset/167577
>
WebKit Commit Bot
Comment 5
2014-04-20 21:19:38 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug