GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — [mypyc] Add primitives for str.capitalize, casefold, swapcase and title by Jahongir-Qurbonov · Pull Request #22413 · python/mypy Conversation
|
| Method | Short ASCII (11 chars) | Long ASCII (176 chars) |
|---|---|---|
capitalize() |
0.257s -> 0.082s | 1.755s -> 0.251s |
casefold() |
0.125s -> 0.081s | 0.285s -> 0.250s |
swapcase() |
0.221s -> 0.087s | 1.439s -> 0.416s |
title() |
0.259s -> 0.085s | 2.026s -> 0.886s |
Non-ASCII strings are roughly unchanged.
Part of mypyc/mypyc#644.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…sses For non-ASCII strings, look up the method on str instead of on the type of the object, so that an override in a str subclass can't make the result something other than a str.
337a69c to
df6b2f0
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.