Ezio Melotti added the comment:

> The cache of size 2 x 256 slots can increase memory consumption by 50 KiB in 
> worst case, 2 x 1024 -- by 200 KiB.

How much is this compared to the total usage?

> But I don't know how common `for c in s` or `s[i]` is used for Japanese text.

I think the same applies to other languages/scripts too, so this optimization 
might be moot unless the cache also improves performances of other more common 
operations (e.g. encoding/decoding).

It would be interesting to see how this affects real-world application: if 
there are no regressions and the memory overhead is not too much I think we can 
accept the patch.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31484>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to