Module: HashTable

Defined in:
lib/hashtable/traits.rb,
lib/hashtable.rb,
lib/hashtable/hash_table.rb,
lib/hashtable/sparse_bit_array.rb

Overview

module HashTable

Defined Under Namespace

Classes: HashTable, IdentityHashTraits, SparseBitArray, SparseBitArrayElement, StringHashTraits, StringIdentityHashTraits

Constant Summary collapse

EXPAND_KEY_COUNT_CONST =
{
  8 => [0, 0],
  16 => [6, 9],
  32 => [8, 17],
  64 => [13, 33],
  128 => [23, 65],
  256 => [44, 129],
  512 => [86, 257],
  1024 => [171, 513],
  2048 => [341, 1025],
  4096 => [682, 2049],
  8192 => [1364, 4097],
  16_384 => [2729, 8193],
  32_768 => [5459, 16_385],
  65_536 => [10_920, 32_769],
  131_072 => [21_842, 65_537],
  262_144 => [43_687, 131_073],
  524_288 => [87_377, 262_145],
  1_048_576 => [174_758, 524_289],
  2_097_152 => [349_520, 1_048_577],
  4_194_304 => [699_045, 2_097_153],
  8_388_608 => [1_398_095, 4_194_305],
  16_777_216 => [2_796_196, 8_388_609],
  33_554_432 => [5_592_398, 16_777_217],
  67_108_864 => [11_184_803, 33_554_433],
  134_217_728 => [22_369_613, 67_108_865],
  268_435_456 => [44_739_234, 134_217_729],
  536_870_912 => [89_478_476, 268_435_457],
  1_073_741_824 => [178_956_961, 536_870_913],
  2_147_483_648 => [357_913_931, 1_073_741_825],
  4_294_967_296 => [715_827_872, 2_147_483_649],
  8_589_934_592 => [1_431_655_754, 4_294_967_297],
  17_179_869_184 => [2_863_311_519, 8_589_934_593],
  34_359_738_368 => [5_726_623_049, 17_179_869_185],
  68_719_476_736 => [11_453_246_110, 34_359_738_369],
  137_438_953_472 => [22_906_492_232, 68_719_476_737],
  274_877_906_944 => [45_812_984_477, 137_438_953_473],
  549_755_813_888 => [91_625_968_967, 274_877_906_945],
  1_099_511_627_776 => [183_251_937_948, 549_755_813_889]
}.freeze