• Victor Stinner's avatar
    Issue #15609: Optimize str%args for integer argument · 621ef3d8
    Victor Stinner yazdı
     - 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
    621ef3d8
formatter_unicode.c 48.6 KB