[Python-Dev] Internal representation of strings and Micropython

Antoine Pitrou antoine at python.org
Thu Jun 5 21:55:54 CEST 2014


Le 04/06/2014 02:51, Chris Angelico a écrit :
> On Wed, Jun 4, 2014 at 3:17 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>
> It would. The downsides of a UTF-8 representation would be slower
> iteration and much slower (O(N)) indexing/slicing.

There's no reason for iteration to be slower. Slicing would get
O(slice offset + slice size) instead of O(slice size).

Regards

Antoine.




More information about the Python-Dev mailing list