Skip to content

Instantly share code, notes, and snippets.

@GeertJohan
Last active August 29, 2015 14:10
Show Gist options
  • Save GeertJohan/7c4e31a349c3d18af079 to your computer and use it in GitHub Desktop.
Save GeertJohan/7c4e31a349c3d18af079 to your computer and use it in GitHub Desktop.
consistent-hashing-tests
"github.com/golang/groupcache/consistenthash"
100000 keys over 3 buckets
cacheA: 47356
cacheC: 11779
100000 keys over 9 buckets
cacheH: 10091
cacheI: 30516
cacheG: 7133
cacheE: 2024
cacheD: 3231
cacheF: 2871
cacheA: 557
cacheB: 40933
cacheC: 2644
"github.com/stathat/consistent"
100000 keys over 3 buckets
cacheC: 29076
cacheA: 44108
cacheB: 26816
100000 keys over 9 buckets
cacheA: 18746
cacheF: 11199
cacheE: 12225
cacheG: 14788
cacheI: 6789
cacheD: 15510
cacheH: 6516
cacheB: 6336
cacheC: 7891
"github.com/dgryski/go-jump"
000: 3329
001: 3329
002: 3342
000: 2497
001: 2499
002: 2502
003: 2502
2502/10000 moved: 25.020%
000: 2001
001: 1996
002: 2002
003: 2005
004: 1996
1996/10000 moved: 19.960%
000: 1665
001: 1663
002: 1662
003: 1671
004: 1669
005: 1670
1670/10000 moved: 16.700%
000: 1425
001: 1425
002: 1427
003: 1429
004: 1441
005: 1437
006: 1416
1416/10000 moved: 14.160%
000: 1249
001: 1245
002: 1241
003: 1246
004: 1251
005: 1246
006: 1232
007: 1290
1290/10000 moved: 12.900%
000: 1105
001: 1110
002: 1107
003: 1111
004: 1124
005: 1113
006: 1107
007: 1148
008: 1075
1075/10000 moved: 10.750%
000: 993
001: 997
002: 994
003: 1000
004: 1015
005: 995
006: 980
007: 1027
008: 979
009: 1020
1020/10000 moved: 10.200%
000: 905
001: 903
002: 906
003: 914
004: 918
005: 902
006: 898
007: 937
008: 889
009: 925
010: 903
903/10000 moved: 9.030%
000: 833
001: 828
002: 836
003: 835
004: 834
005: 831
006: 825
007: 854
008: 818
009: 853
010: 829
011: 824
824/10000 moved: 8.240%
000: 769
001: 765
002: 770
003: 776
004: 764
005: 764
006: 754
007: 787
008: 749
009: 794
010: 765
011: 758
012: 785
785/10000 moved: 7.850%
000: 706
001: 709
002: 714
003: 719
004: 709
005: 709
006: 693
007: 739
008: 685
009: 746
010: 702
011: 708
012: 732
013: 729
729/10000 moved: 7.290%
000: 659
001: 660
002: 659
003: 665
004: 664
005: 663
006: 656
007: 691
008: 648
009: 695
010: 656
011: 653
012: 685
013: 675
014: 671
671/10000 moved: 6.710%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment