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.
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.
Closing some V8-related work items.