diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-17 06:05:31 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-17 06:05:31 +0000 |
commit | 705bd12a48fd8608219cebf41f1fa0099b7d0c08 (patch) | |
tree | 68da221372282ae627d14c1080a79af8eadfd02e /base/histogram.h | |
parent | 3f55e8712f88d8477d9e58f68958e83c92664389 (diff) | |
download | chromium_src-705bd12a48fd8608219cebf41f1fa0099b7d0c08.zip chromium_src-705bd12a48fd8608219cebf41f1fa0099b7d0c08.tar.gz chromium_src-705bd12a48fd8608219cebf41f1fa0099b7d0c08.tar.bz2 |
Remove special code fro calculating bucket index in linear histograms
IMO, the original code was a premature optimization, and worse yet, it
had a subtle off by 1 bug due to floating point rounding (which was
identified by ERoman.... Thanks!!).
This CL removes the special code from linear histograms, and relies on
the "standard" binary search approach to locate the correct bucket
when a new sample is processed.
r=eroman
BUG=24160
Review URL: http://codereview.chromium.org/273065
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29371 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/histogram.h')
-rw-r--r-- | base/histogram.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/base/histogram.h b/base/histogram.h index 1a2b443..4d40c1b 100644 --- a/base/histogram.h +++ b/base/histogram.h @@ -466,8 +466,6 @@ class LinearHistogram : public Histogram { protected: // Initialize ranges_ mapping. virtual void InitializeBucketRange(); - // Find bucket to increment for sample value. - virtual size_t BucketIndex(Sample value) const; virtual double GetBucketSize(Count current, size_t i) const; // If we have a description for a bucket, then return that. Otherwise |