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
Review URL: https://codereview.chromium.org/1866423002
Cr-Commit-Position: refs/heads/master@{#385893}
CrOS-Libchrome-Original-Commit: fca9ef5451d1dc700bbf2370e1147b05ad704cfc
2 files changed