3 ms·
Python 3 actually uses UTF-32, so it's all constant-time. A tradeoff few make, certainly!
by Sniffnoy 2y ago
Python 3 actually uses UTF-32, so it's all constant-time. A tradeoff few make, certainly!
- lifthrasiir 2y agoOr more accurately, behaves as if it is UTF-32. The actual implementation uses multiple internal representations, just like JS engines emulating UCS-2.
- Sniffnoy 2y agoHuh! I was unaware (of both of those), thanks.