Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove predictability and hashing #1

Merged
merged 1 commit into from
Apr 24, 2019
Merged

Conversation

robert-milan
Copy link
Collaborator

Removes the use of hashing to predict where an object should be added or where to start searching the slabs for that object. We don't need this in Metrictank because the string interning library uses an inverted index to store the addresses of all added objects.

Note: TestAdd1Mil was not included in this PR because it was only used for comparison.

(pprof) top 20
Showing nodes accounting for -62.86s, 68.68% of 91.53s total
Dropped 200 nodes (cum <= 0.46s)
      flat  flat%   sum%        cum   cum%
   -32.20s 35.18% 35.18%    -63.22s 69.07%  github.com/replay/go-generic-object-store.(*slabPool).add
   -16.41s 17.93% 53.11%    -16.41s 17.93%  github.com/replay/go-generic-object-store.(*slabPool).getNextID (inline)
   -15.07s 16.46% 69.57%    -15.07s 16.46%  github.com/replay/go-generic-object-store/vendor/github.com/willf/bitset.(*BitSet).Test (inline)
     0.83s  0.91% 68.67%      0.83s  0.91%  github.com/replay/go-generic-object-store/vendor/github.com/willf/bitset.(*BitSet).NextClear
    -0.02s 0.022% 68.69%    -16.43s 17.95%  github.com/replay/go-generic-object-store.(*slabPool).getNextSlabID (inline)
     0.01s 0.011% 68.68%    -63.11s 68.95%  github.com/replay/go-generic-object-store.TestAdd1Mil
         0     0% 68.68%    -63.23s 69.08%  github.com/replay/go-generic-object-store.(*ObjectStore).Add
         0     0% 68.68%    -63.11s 68.95%  testing.tRunner

@robert-milan robert-milan merged commit 621898a into master Apr 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant