Skip to content

Commit 6364880

Browse files
committed
More timings suggest that 2500 is closer to the break-even point.
1 parent ffcd849 commit 6364880

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_heapqmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ heapify_internal(PyObject *heap, int siftup_func(PyListObject *, Py_ssize_t))
335335
in cache, we prefer the simpler algorithm with less branching.
336336
*/
337337
n = PyList_GET_SIZE(heap);
338-
if (n > 10000)
338+
if (n > 2500)
339339
return cache_friendly_heapify(heap, siftup_func);
340340

341341
/* Transform bottom-up. The largest index there's any point to

0 commit comments

Comments
 (0)