Skip to content

Instantly share code, notes, and snippets.

@yermilov
Created March 5, 2017 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yermilov/63780a37c936fd4d27a7241351ea12b3 to your computer and use it in GitHub Desktop.
Save yermilov/63780a37c936fd4d27a7241351ea12b3 to your computer and use it in GitHub Desktop.
if (binCount >= TREEIFY_THRESHOLD - 1) // TREEIFY_THRESHOLD = 8
treeifyBin(tab, hash);
...
final void treeifyBin(Node<K,V>[] tab, int hash) {
int n, index; Node<K,V> e;
if (tab == null || (n = tab.length) < MIN_TREEIFY_CAPACITY) // MIN_TREEIFY_CAPACITY = 64
resize();
else ... // actually treeify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment