◐ Shell
clean mode source ↗

Message 183552 - Python tracker

> Here is an experimental patch. The speedup is ... measurable.

It's likely to be more useful for dict and set, to avoid/limit rehashs.
Also, the allocation overhead depends on the implementation, I suspect the gain would be more important with PyPy.

FWIW, Java proposes this for lists and maps, but I'm not convinced exposing such tunables really makes sense for Python.