Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2086)

Issue 8315044: Reduce loop size in SkTileGridNextDatum (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by TomH
Modified:
11 years, 7 months ago
Reviewers:
junov, junov1
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

We don't have a benchmark in Skia, but this seems to give nearly 2x speedup in Chrome for the larger queries that dominate the distribution. That should translate into a 5% CPU savings for the compositor. From https://code.google.com/p/skia/issues/detail?id=1212, selected costs without this patch: queryTileCount #calls totalTime averageTime 1 448 0.934ms 2us 2 187 0.584ms 3us 4 18 0.071ms 3us 12 4 0.099ms 24us 24 20 1.039ms 52us 30 44 3.093ms 70us 42 27 3.251ms 120us 84 82 29.138ms 355us Selected costs with this patch: 1 408 0.505ms 1us 2 172 0.549ms 3us 12 27 0.371ms 13us 20 30 0.966ms 32us 30 41 1.745ms 42us 84 96 19.808ms 206us

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -2 lines) Patch
M src/core/SkTileGrid.h View 1 chunk +8 lines, -2 lines 1 comment Download

Messages

Total messages: 5
TomH
PTAL.
11 years, 7 months ago (2013-04-05 13:53:57 UTC) #1
junov1
Great simple optimization! lgtm with minor correction. https://codereview.appspot.com/8315044/diff/1/src/core/SkTileGrid.h File src/core/SkTileGrid.h (right): https://codereview.appspot.com/8315044/diff/1/src/core/SkTileGrid.h#newcode108 src/core/SkTileGrid.h:108: } else ...
11 years, 7 months ago (2013-04-05 14:08:08 UTC) #2
TomH
On 2013/04/05 14:08:08, junov1 wrote: > Great simple optimization! > lgtm with minor correction. > ...
11 years, 7 months ago (2013-04-05 14:10:17 UTC) #3
junov1
On 2013/04/05 14:10:17, TomH wrote: > On 2013/04/05 14:08:08, junov1 wrote: > > Great simple ...
11 years, 7 months ago (2013-04-05 14:13:11 UTC) #4
TomH
11 years, 7 months ago (2013-04-05 14:22:01 UTC) #5
On 2013/04/05 14:13:11, junov1 wrote:
> Oh yeah. So to compensate for the poor readability, a comment would be nice.

Touche! Commented and landed as r8543.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b