diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-10-02 00:33:47 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-10-02 00:33:47 +0200 |
commit | 9b7dd8a6114201295c5dce3a6cd3d48550a88056 (patch) | |
tree | adafefd8fa760691f69936c6f77f5bc20570bd19 /Python/Python-ast.c | |
parent | 1b1b69e8ae410a99109c76f87f646603445ed2a9 (diff) | |
download | cpython-9b7dd8a6114201295c5dce3a6cd3d48550a88056.tar.gz |
Issue #15609: Optimize str%args for integer argument
- Use _PyLong_FormatWriter() instead of formatlong() when possible, to avoid
a temporary buffer
- Enable the fast path when width is smaller or equals to the length,
and when the precision is bigger or equals to the length
- Add unit tests!
- formatlong() uses PyUnicode_Resize() instead of _PyUnicode_FromASCII()
to resize the output string
Diffstat (limited to 'Python/Python-ast.c')
0 files changed, 0 insertions, 0 deletions