Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
In addition to documenting the cache size, consider a substantial increase to the limit. Compiled regex patterns tend to be very small. We can afford to have a lot of them (tens of thousands seems reasonable to me). Regarding the suggested alternative, ISTM that calling translate() directly doesn't help much. For a cache miss, the overhead of the lru_cache() is very small relative to the work done by translate(). ---------- nosy: +rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42799> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com