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

Issue 6906047: speedup peek32() when the offset is in the last block (fTail) (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by reed1
Modified:
11 years, 6 months ago
Reviewers:
Leon
CC:
skia-review_googlegroups.com, bsalomon
Base URL:
http://skia.googlecode.com/svn/trunk/
Visibility:
Public.

Description

speedup peek32() when the offset is in the last block (fTail) Committed: https://code.google.com/p/skia/source/detail?r=6708

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -18 lines) Patch
M include/core/SkWriter32.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M src/core/SkWriter32.cpp View 1 6 chunks +43 lines, -18 lines 1 comment Download

Messages

Total messages: 4
reed1
11 years, 6 months ago (2012-12-07 16:02:06 UTC) #1
Leon
Are there benchmarks that show improvement with this change? https://codereview.appspot.com/6906047/diff/1/include/core/SkWriter32.h File include/core/SkWriter32.h (right): https://codereview.appspot.com/6906047/diff/1/include/core/SkWriter32.h#newcode201 include/core/SkWriter32.h:201: ...
11 years, 6 months ago (2012-12-07 16:13:38 UTC) #2
reed1
https://codereview.appspot.com/6906047/diff/1/include/core/SkWriter32.h File include/core/SkWriter32.h (right): https://codereview.appspot.com/6906047/diff/1/include/core/SkWriter32.h#newcode201 include/core/SkWriter32.h:201: uint32_t fAllocatedBeforeLastBlock; On 2012/12/07 16:13:38, scroggo-work wrote: > I ...
11 years, 6 months ago (2012-12-07 16:54:03 UTC) #3
Leon
11 years, 6 months ago (2012-12-07 17:45:44 UTC) #4
LGTM

https://codereview.appspot.com/6906047/diff/6001/src/core/SkWriter32.cpp
File src/core/SkWriter32.cpp (right):

https://codereview.appspot.com/6906047/diff/6001/src/core/SkWriter32.cpp#newc...
src/core/SkWriter32.cpp:210: fWrittenBeforeLastBlock = originalOffset - offset;
Small nit. These names confused me when trying to understand these lines. Maybe
'requestedOffset' instead of originalOffset (which made me think the offset
before this function, though obviously the code tells me otherwise). I can't
think of a better name for 'offset' ('localOffset' sounds good at this point,
although it's not true for the entire use of the variable...).

Maybe a comment explaining what two numbers are being subtracted would help.
Sign in to reply to this message.

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