Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Load factor and rehashing in hashsets

  1. Oct 31, 2012 #1
    I had some general questions related to hashing.

    1. Load factor in a HashTable is when you want to increase capacity of buffer. Is there any advantage/disadvantage of setting the loadfactor less than 100% vs setting load factor at 100%?

    2. When you increase capacity, you have to rehash all values inside. Is there any way to increase capacity without a rehash?

    This is crossposted on [stackoverflow]
  2. jcsd
  3. Oct 31, 2012 #2


    User Avatar
    Homework Helper

    Wiki article mentions overhead increases once the load factor exceeds about 2/3rds.


    Not mentioned is the time it takes to iniitialize a hash table to empty, which could be an issue with a huge hash table in an attempt to produce a very low load factor (or one with a huge capacity). I don't know how to optimize dynamic capacity.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Load factor rehashing Date
Project Euler solution 3 Aug 30, 2017
Android Getting Gifs to load Feb 22, 2014
Combinist: Unlimited Detail Object Loading Feb 1, 2012
Loading Data in Matlab (or Fortran) Aug 8, 2011
Problem loading large files (IOSTAT=100) Sep 14, 2009