Skip to content

Instantly share code, notes, and snippets.

@methane
Created March 30, 2017 18:18
Show Gist options
  • Save methane/8faf12621cdb2166019bbcee65987e99 to your computer and use it in GitHub Desktop.
Save methane/8faf12621cdb2166019bbcee65987e99 to your computer and use it in GitHub Desktop.
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 2ccf183..db9b86b 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -302,7 +302,7 @@ set_table_resize(PySetObject *so, Py_ssize_t minused)
setentry small_copy[PySet_MINSIZE];
assert(minused >= 0);
- minused = (minused > 50000) ? minused * 2 : minused * 4;
+ minused *= 2;
/* Find the smallest table size > minused. */
/* XXX speed-up with intrinsics */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment