]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
More timings suggest that 2500 is closer to the break-even point.
authorRaymond Hettinger <python@rcn.com>
Wed, 13 May 2015 04:40:50 +0000 (21:40 -0700)
committerRaymond Hettinger <python@rcn.com>
Wed, 13 May 2015 04:40:50 +0000 (21:40 -0700)
Modules/_heapqmodule.c

index 01b35be8eba7382fe835e7dd165f9ad44d956f5e..88c35cf32eec3d16f0285867fa9e5342951fe956 100644 (file)
@@ -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