Commit b5c3ea3
committed
Issue #14687: Optimize str%args
* formatfloat() uses unicode_fromascii() instead of PyUnicode_DecodeASCII()
to not have to check characters, we know that it is really ASCII
* Use PyUnicode_FromOrdinal() instead of _PyUnicode_FromUCS4() to format
a character: if avoids a call to ucs4lib_find_max_char() to compute
the maximum character (whereas we already know it, it is just the character
itself)1 parent cc1c146 commit b5c3ea3
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13431 | 13431 | | |
13432 | 13432 | | |
13433 | 13433 | | |
13434 | | - | |
| 13434 | + | |
13435 | 13435 | | |
13436 | 13436 | | |
13437 | 13437 | | |
| |||
13947 | 13947 | | |
13948 | 13948 | | |
13949 | 13949 | | |
13950 | | - | |
| 13950 | + | |
13951 | 13951 | | |
13952 | 13952 | | |
13953 | 13953 | | |
| |||
0 commit comments