SIGN IN SIGN UP

gh-119182: Use public PyUnicodeWriter API in ga_repr() (#120799)

The public PyUnicodeWriter API enables overallocation by default and
so is more efficient.

Benchmark:

python -m pyperf timeit \
    -s 't = list[int, float, complex, str, bytes, bytearray, ' \
                 'memoryview, list, dict]' \
    'str(t)'

Result:

1.49 us +- 0.03 us -> 1.10 us +- 0.02 us: 1.35x faster
V
Victor Stinner committed
73b4492c19f494c1b10dfa0b80840a52ce3c63a2
Parent: 31ce5c0
Committed by GitHub <noreply@github.com> on 6/20/2024, 6:35:35 PM