Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

Hash Table Load Capacity

Plan power-of-two table capacity and unused slots at a chosen maximum load factor.

Developer workspace● Runs in your browser
01 Your input
02 Your result
View or copy raw result data
FormulaPower-of-two capacity = 2**Math.ceil(Math.log2(entries/load)); Slot allocation = 2**Math.ceil(Math.log2(entries/load))*slot/1048576; Actual load factor = entries/(2**Math.ceil(Math.log2(entries/load)))

Made for real tasks

  • Plan power-of-two table capacity and unused slots at a chosen maximum load factor.
Explore step-by-step workflows →

Worked example

Inputs

Expected entries
100000 entries
Maximum load factor
0.75 ratio
Bytes per allocated slot
24 bytes

Expected results

Power-of-two capacity
262144 slots
Slot allocation
6 MiB
Actual load factor
0.3814697266 ratio

Load the example in the workspace to reproduce these results. Display rounding does not change the underlying calculation.

How to use this tool

  1. Enter expected entries, maximum load factor, bytes per allocated slot in the displayed units.
  2. Calculate the scenario, then compare it with measurements before changing a system.

Try this example

{
  "entries": 100000,
  "load": 0.75,
  "slot": 24
}

Accuracy and scope

Open-addressing allocation estimate; keys stored externally and implementation-specific headers excluded.

Is my data uploaded?

This tool runs locally in your browser. Input and output are not sent to a processing server. Copy or download your result before leaving the page.