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

Issue 1866423002: Use strings for keys in the histogram map. (Closed)

Created:
4 years, 8 months ago by bcwhite
Modified:
4 years, 8 months ago
CC:
chromium-reviews, asvitkine+watch_chromium.org, Georges Khalil
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use strings for keys in the histogram map. Using the MD5 hash of the name for the key makes for an efficient mapping but calculating that hash is expensive. A simple string-compare that first checks the length cuts over 40% off the run-time according to the timing tests. And since timing tests are skewed towards names of only a few distinct lengths, the real-world improvement should be even more. BUG=601572 Committed: https://crrev.com/fca9ef5451d1dc700bbf2370e1147b05ad704cfc Cr-Commit-Position: refs/heads/master@{#385893}

Patch Set 1 #

Patch Set 2 : fixed signed/unsigned comparison #

Total comments: 8

Patch Set 3 : addressed review comments by Alexei #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -17 lines) Patch
M base/metrics/statistics_recorder.h View 1 2 1 chunk +30 lines, -1 line 0 comments Download
M base/metrics/statistics_recorder.cc View 6 chunks +10 lines, -16 lines 0 comments Download

Messages

Total messages: 15 (6 generated)
bcwhite
4 years, 8 months ago (2016-04-07 20:05:32 UTC) #2
Alexei Svitkine (slow)
lgtm Can you file a crbug for this? https://codereview.chromium.org/1866423002/diff/20001/base/metrics/statistics_recorder.h File base/metrics/statistics_recorder.h (right): https://codereview.chromium.org/1866423002/diff/20001/base/metrics/statistics_recorder.h#newcode34 base/metrics/statistics_recorder.h:34: // ...
4 years, 8 months ago (2016-04-07 20:21:10 UTC) #4
bcwhite
https://codereview.chromium.org/1866423002/diff/20001/base/metrics/statistics_recorder.h File base/metrics/statistics_recorder.h (right): https://codereview.chromium.org/1866423002/diff/20001/base/metrics/statistics_recorder.h#newcode34 base/metrics/statistics_recorder.h:34: // A class used as a key for the ...
4 years, 8 months ago (2016-04-07 20:24:33 UTC) #5
Alexei Svitkine (slow)
https://codereview.chromium.org/1866423002/diff/20001/base/metrics/statistics_recorder.h File base/metrics/statistics_recorder.h (right): https://codereview.chromium.org/1866423002/diff/20001/base/metrics/statistics_recorder.h#newcode34 base/metrics/statistics_recorder.h:34: // A class used as a key for the ...
4 years, 8 months ago (2016-04-07 20:49:09 UTC) #7
bcwhite
https://codereview.chromium.org/1866423002/diff/20001/base/metrics/statistics_recorder.h File base/metrics/statistics_recorder.h (right): https://codereview.chromium.org/1866423002/diff/20001/base/metrics/statistics_recorder.h#newcode34 base/metrics/statistics_recorder.h:34: // A class used as a key for the ...
4 years, 8 months ago (2016-04-07 21:09:16 UTC) #8
Alexei Svitkine (slow)
lgtm
4 years, 8 months ago (2016-04-07 21:10:41 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1866423002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1866423002/40001
4 years, 8 months ago (2016-04-07 21:17:53 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 8 months ago (2016-04-07 22:06:38 UTC) #13
commit-bot: I haz the power
4 years, 8 months ago (2016-04-07 22:07:45 UTC) #15
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/fca9ef5451d1dc700bbf2370e1147b05ad704cfc
Cr-Commit-Position: refs/heads/master@{#385893}

Powered by Google App Engine
This is Rietveld 408576698