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

Issue 6453116: Reduce allocations in RandomPathBench (Closed)

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

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -51 lines) Patch
M bench/PathBench.cpp View 9 chunks +41 lines, -48 lines 0 comments Download
M include/core/SkTemplates.h View 3 chunks +20 lines, -3 lines 2 comments Download

Messages

Total messages: 3
bsalomon
This reduces the allocations in the base class, will follow up with reducing allocations in ...
12 years, 1 month ago (2012-08-14 14:37:32 UTC) #1
reed1
lgtm Not important here, but forcing the realloc seems not always necessary (also these uses ...
12 years, 1 month ago (2012-08-14 14:51:41 UTC) #2
bsalomon
12 years, 1 month ago (2012-08-14 15:10:20 UTC) #3
Yes, I want to reset to 0 to compact after the test runs. SkAutoTArray would
have to store the count (in the release build) in order to lazily realloc. Even
if it stored the count it seems like a caller may want an optional way to force
the realloc (for Ts that have a constructor and where the desired behavior is to
initialize the array with default objects).

Closed with r5080.

http://codereview.appspot.com/6453116/diff/1/include/core/SkTemplates.h
File include/core/SkTemplates.h (right):

http://codereview.appspot.com/6453116/diff/1/include/core/SkTemplates.h#newco...
include/core/SkTemplates.h:115: */
On 2012/08/14 14:51:42, reed1 wrote:
> explicit SkAutoTArray(int count);

Done.
Sign in to reply to this message.

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