| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Append result items to the output list with _PyList_AppendTakeRef instead of PyList_Append followed by Py_DECREF, removing a reference-count round-trip per appended item (and a per-append lock on the free-threaded build). Applied to the result lists built by findall and the sub/subn helper, where the append is a meaningful share of the work. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Looks good to me
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. The code looks simpler, and it also brings a performance improvement.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Append result items to the output list with _PyList_AppendTakeRef instead of PyList_Append followed by Py_DECREF, removing a reference-count round-trip per appended item (and a per-append lock on the free-threaded build).
Microbenchmarks