Reverting the incremental GC in Python 3.14 and 3.15
9 hours ago
- #Real-World Data
- #Algorithm Testing
- #Python Optimization
- The author laments the scarcity of real-world data for testing optimizations in Python, noting that feedback often comes only from synthetic tests.
- Historical examples include sorting and pymalloc issues, which were initially reported by users on Stack Overflow due to inexplicable slowdowns.
- Efforts to gather timing results for sorting algorithm changes yielded minimal responses, highlighting a reliance on limited real-world input.
- Dict collision resolution strategies have been primarily tested with synthetic inputs, with failures emerging from rare real-life app reports.
- Academic appeals for real-world data, such as by Sebastian Wild for mergesort heuristics, often attract only contrived cases instead of practical ones.
- An issue about quadratic-time behavior related to gc changes was hard to diagnose, as the test case didn't create cycles but triggered inefficient heuristics.
- While sorting has predictable worst-case behavior, gc contexts are messier and less predictable in average scenarios.
- There is a call to enable incremental gc in production releases to encourage real-world feedback, as current chances are slim and mostly for catastrophic cases.