STINNER Victor added the comment: > You shouldn't cache Py_SIZE(v) because it can be changed during iteration.
Oops, I fixed the code on my PC, but I generated the patch before fixing this issue. I agree that Py_SIZE(v) should not be cached. > Due to benchmark results in issue15381 I afraid this patch will be much > slower on Windows. See my results on Windows 7 below, the benchmark is faster is most cases. PyUnicodeWriter is always faster than PyAccu if I change the overallocation factor to 50%. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19513> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com