WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
103331
[V8] Replace toWebCoreString()/toWebCoreAtomicString() with V8Parameter
https://bugs.webkit.org/show_bug.cgi?id=103331
Summary
[V8] Replace toWebCoreString()/toWebCoreAtomicString() with V8Parameter
Kentaro Hara
Reported
2012-11-26 17:23:14 PST
V8ParameterBase is slow. V8ParameterBase is being used in hot call paths. // Code A AtomicString str = toWebCoreAtomicString(v8Object); // Assume that v8Object is v8::String or v8::Int32 imp->setAttribute(HTMLNames::idAttr, str); // Code B STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str, v8Object); // Assume that v8Object is v8::String or v8::Int32 imp->setAttribute(HTMLNames::idAttr, str); Code B is 10% slower than Code A. Ideally Code A should be as fast as Code B. Then we can replace all toWebCoreAtomicString()s and toWebCoreString()s with V8ParameterBase; i.e. we can always use V8ParameterBase regardless of String or AtomicString.
Attachments
micro benchmarks
(1.92 KB, text/html)
2012-11-26 17:53 PST
,
Kentaro Hara
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Kentaro Hara
Comment 1
2012-11-26 17:53:38 PST
Created
attachment 176130
[details]
micro benchmarks Hmm, it looks like 10% slowness was placebo. The perf is a bit flaky. As far as I test with the micro benchmarks attached to this bug and Bindings/id-setter.html a lot of times, there is no observable perf diff between V8Parameter and toWebCoreString()/toWebCoreAtomicString(). So the conclusion is that V8Parameter is as fast as toWebCoreString()/toWebCoreAtomicString(), and thus we can replace toWebCoreString()/toWebCoreAtomicString() with V8Parameter without regressing performance.
Brian Burg
Comment 2
2014-12-16 00:48:03 PST
Closing some V8-related work items.
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