From: Raymond Hettinger Date: Wed, 13 May 2015 04:40:50 +0000 (-0700) Subject: More timings suggest that 2500 is closer to the break-even point. X-Git-Tag: v3.5.0b1~176 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=636488043b490ab70413990b458443aa41f504b2;p=thirdparty%2FPython%2Fcpython.git More timings suggest that 2500 is closer to the break-even point. --- diff --git a/Modules/_heapqmodule.c b/Modules/_heapqmodule.c index 01b35be8eba7..88c35cf32eec 100644 --- a/Modules/_heapqmodule.c +++ b/Modules/_heapqmodule.c @@ -335,7 +335,7 @@ heapify_internal(PyObject *heap, int siftup_func(PyListObject *, Py_ssize_t)) in cache, we prefer the simpler algorithm with less branching. */ n = PyList_GET_SIZE(heap); - if (n > 10000) + if (n > 2500) return cache_friendly_heapify(heap, siftup_func); /* Transform bottom-up. The largest index there's any point to