WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
69154
feBlend uses a table of function pointers which reduces inlineability inside the main loop
https://bugs.webkit.org/show_bug.cgi?id=69154
Summary
feBlend uses a table of function pointers which reduces inlineability inside ...
Tim Horton
Reported
2011-09-30 10:25:26 PDT
Before: 1 blend 2083500 pixel image took 8408 us 2 blend 2083500 pixel image took 8576 us 3 blend 2083500 pixel image took 9006 us 4 blend 2083500 pixel image took 9942 us 5 blend 2083500 pixel image took 9592 us After: 1 blend 2083500 pixel image took 6792 us 2 blend 2083500 pixel image took 6592 us 3 blend 2083500 pixel image took 6896 us 4 blend 2083500 pixel image took 8368 us 5 blend 2083500 pixel image took 7974 us 20% speedup
Attachments
patch
(5.10 KB, patch)
2011-09-30 10:41 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
style
(5.03 KB, patch)
2011-09-30 10:50 PDT
,
Tim Horton
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2011-09-30 10:26:20 PDT
<
rdar://problem/10215221
>
Tim Horton
Comment 2
2011-09-30 10:41:13 PDT
Created
attachment 109310
[details]
patch
Tim Horton
Comment 3
2011-09-30 10:41:42 PDT
(In reply to
comment #2
)
> Created an attachment (id=109310) [details] > patch + caching bbox
autofill :-\
WebKit Review Bot
Comment 4
2011-09-30 10:44:19 PDT
Attachment 109310
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/platform/graphics/filters/FEBlend.cpp:124: A case label should not be indented, but line up with its switch statement. [whitespace/indent] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 5
2011-09-30 10:50:16 PDT
Created
attachment 109312
[details]
style
Darin Adler
Comment 6
2011-09-30 10:51:23 PDT
Comment on
attachment 109312
[details]
style Putting the switch inside the loop speeds things up by 20%. Could you speed up even more by putting the switch outside the loop? With template functions you could even inline the functions and have the switch statement outside the entire apply function. How much more would that speed things up?
Zoltan Herczeg
Comment 7
2011-09-30 11:01:27 PDT
(In reply to
comment #6
)
> (From update of
attachment 109312
[details]
) > Putting the switch inside the loop speeds things up by 20%. Could you speed up even more by putting the switch outside the loop? With template functions you could even inline the functions and have the switch statement outside the entire apply function. How much more would that speed things up?
Probably not much thanks to the advanced branch predictors. But templates probably could be an easy way to do this refactor, and we can see what happens.
WebKit Review Bot
Comment 8
2011-09-30 11:08:21 PDT
Comment on
attachment 109312
[details]
style Clearing flags on attachment: 109312 Committed
r96407
: <
http://trac.webkit.org/changeset/96407
>
WebKit Review Bot
Comment 9
2011-09-30 11:08:26 PDT
All reviewed patches have been landed. Closing bug.
Tim Horton
Comment 10
2011-09-30 11:25:16 PDT
(In reply to
comment #7
)
> (In reply to
comment #6
) > > (From update of
attachment 109312
[details]
[details]) > > Putting the switch inside the loop speeds things up by 20%. Could you speed up even more by putting the switch outside the loop? With template functions you could even inline the functions and have the switch statement outside the entire apply function. How much more would that speed things up? > > Probably not much thanks to the advanced branch predictors. But templates probably could be an easy way to do this refactor, and we can see what happens.
Seems to be a very small change, if at all; I guess I got it to the point where the compiler could do the rest of the work and hoist the switch out of the loop. I'm testing with release builds; I bet your proposed optimizations would show a bigger change in a debug build.
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