flaming vs accuracy [was Re: Performance of int/long in Python 3]

Neil Hodgson nhodgson at iinet.net.au
Thu Mar 28 13:11:55 CET 2013

Ian Foote:

> Specifically, indexing a variable-length encoding like utf-8 is not as
> efficient as indexing a fixed-length encoding.

    Many common string operations do not require indexing by character 
which reduces the impact of this inefficiency. UTF-8 seems like a 
reasonable choice for an internal representation to me. One benefit of 
UTF-8 over Python's flexible representation is that it is, on average, 
more compact over a wide set of samples.


More information about the Python-list mailing list