Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Issue 113783002: [POSSIBLE PERFORMANCE IMPACT] Remove UNLIKELY from bindings required arguments check (Closed)

Created:
7 years ago by Nils Barth (inactive)
Modified:
7 years ago
Reviewers:
haraken
CC:
blink-reviews, kojih, arv+blink, jsbell+bindings_chromium.org, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, Nate Chapin, watchdog-blink-watchlist_google.com, kouhei (in TOK)
Visibility:
Public.

Description

[POSSIBLE PERFORMANCE IMPACT] Remove UNLIKELY from bindings required arguments check We'd like to remove UNLIKELY from the bindings code, as it is generally not very useful (and just clutters the code). This potentially has *performance impact*, but should not change behavior. We're thus doing this one place at a time, starting here (over ~7 CLs, assuming it goes ok). Specifically, UNLIKELY adds a |__builtin_expect(..., 0)| for GCC, so any perf impact would show up on Linux only. Tested via Dromaeo DOM Core Tests http://dromaeo.com/?dom Looks like a 1% regression on DOM attributes (before ~1000, after ~990), others within noise. Before: http://dromaeo.com/?id=211724 http://dromaeo.com/?id=211731 After: http://dromaeo.com/?id=211727 http://dromaeo.com/?id=211732 For reference: #if COMPILER(GCC) #define UNLIKELY(x) __builtin_expect((x), 0) #else #define UNLIKELY(x) (x) #endif https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/wtf/Compiler.h&q=UNLIKELY&l=153 GCC docs: http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html

Patch Set 1 #

Patch Set 2 : Remove FIXME #

Unified diffs Side-by-side diffs Delta from patch set Stats (+158 lines, -159 lines) Patch
M Source/bindings/scripts/code_generator_v8.pm View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/templates/interface.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8SupportTestInterface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestCustomAccessors.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestEventTarget.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceImplementedAs.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestNamedConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 64 chunks +64 lines, -64 lines 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.cpp View 74 chunks +74 lines, -74 lines 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.cpp View 6 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Nils Barth (inactive)
Here's the first UNLIKELY removal CL; shall we send a note to perf sheriffs to ...
7 years ago (2013-12-12 08:12:09 UTC) #1
haraken
On 2013/12/12 08:12:09, Nils Barth wrote: > Here's the first UNLIKELY removal CL; > shall ...
7 years ago (2013-12-12 08:26:33 UTC) #2
haraken
On 2013/12/12 08:26:33, haraken wrote: > On 2013/12/12 08:12:09, Nils Barth wrote: > > Here's ...
7 years ago (2013-12-12 08:27:15 UTC) #3
Nils Barth (inactive)
On 2013/12/12 08:26:33, haraken wrote: > You can try Dromaeo/dom: http://dromaeo.com/?dom On 2013/12/12 08:27:15, haraken ...
7 years ago (2013-12-13 02:34:51 UTC) #4
haraken
On 2013/12/13 02:34:51, Nils Barth wrote: > On 2013/12/12 08:26:33, haraken wrote: > > You ...
7 years ago (2013-12-13 03:13:59 UTC) #5
Nils Barth (inactive)
On 2013/12/13 03:13:59, haraken wrote: > It's a bit surprise to me that this regresses ...
7 years ago (2013-12-13 03:42:31 UTC) #6
Inactive
7 years ago (2013-12-13 14:20:59 UTC) #7
Message was sent while issue was closed.
On 2013/12/13 02:34:51, Nils Barth wrote:
> On 2013/12/12 08:26:33, haraken wrote:
> > You can try Dromaeo/dom: http://dromaeo.com/?dom
> 
> On 2013/12/12 08:27:15, haraken wrote:
> > LGTM if there's not regression in Dromaeo/dom.
> 
> Looks like a 1% regression on DOM attributes 
> (before ~1000, after ~990),
> others within noise.
> This sounds like what we'd expect if it's having a minor impact.
> 
> Before:
> http://dromaeo.com/?id=211724
> 
> After:
> http://dromaeo.com/?id=211732

Yay, my change wasn't so useless after all :)

Powered by Google App Engine
This is Rietveld 408576698