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

Issue 2709983006: base::JoinString: Pre-allocate the string to its final size. (Closed)

Created:
3 years, 10 months ago by Matt Giuca
Modified:
3 years, 9 months ago
Reviewers:
danakj, dcheng
CC:
chromium-reviews, jshin+watch_chromium.org, vmpstr+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base::JoinString: Pre-allocate the string to its final size. This avoids re-allocation/copying costs as the string is constructed. BUG=695333 Review-Url: https://codereview.chromium.org/2709983006 Cr-Commit-Position: refs/heads/master@{#454189} Committed: https://chromium.googlesource.com/chromium/src/+/130c60771ce2b0a3e6ef84046905a7f00fcdb2dd

Patch Set 1 #

Patch Set 2 : Remove braces. #

Patch Set 3 : Fast-path when parts.size == 1 (extremely common). #

Patch Set 4 : Revert PS 3; removes the fast path. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -5 lines) Patch
M base/strings/string_util.cc View 1 3 2 chunks +15 lines, -5 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 36 (17 generated)
Matt Giuca
3 years, 10 months ago (2017-02-23 06:08:28 UTC) #2
dcheng
lgtm
3 years, 10 months ago (2017-02-23 06:29:59 UTC) #3
Matt Giuca
Looks like Dana is OOO and Daniel has relevant owners, so landing.
3 years, 9 months ago (2017-02-28 23:10:13 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2709983006/20001
3 years, 9 months ago (2017-02-28 23:10:54 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/399699)
3 years, 9 months ago (2017-03-01 00:05:23 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2709983006/20001
3 years, 9 months ago (2017-03-01 00:34:13 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/320073)
3 years, 9 months ago (2017-03-01 01:27:34 UTC) #17
Matt Giuca
While the CQ was failing to finish, I did some profiling on a local build. ...
3 years, 9 months ago (2017-03-01 02:38:39 UTC) #18
dcheng
Out of curiosity, does it make a difference in actual #s?
3 years, 9 months ago (2017-03-01 03:12:08 UTC) #19
Matt Giuca
On 2017/03/01 03:12:08, dcheng wrote: > Out of curiosity, does it make a difference in ...
3 years, 9 months ago (2017-03-01 05:28:41 UTC) #20
danakj
On Tue, Feb 28, 2017 at 9:38 PM, <mgiuca@chromium.org> wrote: > While the CQ was ...
3 years, 9 months ago (2017-03-01 17:12:44 UTC) #21
dcheng
On 2017/03/01 05:28:41, Matt Giuca wrote: > On 2017/03/01 03:12:08, dcheng wrote: > > Out ...
3 years, 9 months ago (2017-03-01 18:00:34 UTC) #22
Matt Giuca
On 2017/03/01 17:12:44, danakj wrote: > Seems okay to me. Also, I didn't realize ur ...
3 years, 9 months ago (2017-03-01 23:48:25 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2709983006/60001
3 years, 9 months ago (2017-03-01 23:49:04 UTC) #26
dcheng
On 2017/03/01 23:48:25, Matt Giuca wrote: > On 2017/03/01 17:12:44, danakj wrote: > > Seems ...
3 years, 9 months ago (2017-03-02 00:44:40 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/164865)
3 years, 9 months ago (2017-03-02 00:59:07 UTC) #29
Matt Giuca
On 2017/03/02 00:44:40, dcheng wrote: > On 2017/03/01 23:48:25, Matt Giuca wrote: > > On ...
3 years, 9 months ago (2017-03-02 02:08:11 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2709983006/80001
3 years, 9 months ago (2017-03-02 02:09:24 UTC) #33
commit-bot: I haz the power
3 years, 9 months ago (2017-03-02 06:00:48 UTC) #36
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/130c60771ce2b0a3e6ef84046905...

Powered by Google App Engine
This is Rietveld 408576698