[issue36482] let struct's internal cache use FIFO policy

2019-03-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't know that FIFO makessense in the context of how the struct module is typically used. Also rebuilding structs in cheap so there is very little need for further optimization. As far as I can tell, no user has ever reported a performance issue

[issue36482] let struct's internal cache use FIFO policy

2019-03-29 Thread Ma Lin
Ma Lin added the comment: FYI, re module's cache is using FIFO policy: https://github.com/python/cpython/blob/v3.8.0a3/Lib/re.py#L288-L293 -- ___ Python tracker ___

[issue36482] let struct's internal cache use FIFO policy

2019-03-29 Thread Ma Lin
Change by Ma Lin : -- keywords: +patch pull_requests: +12558 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue36482] let struct's internal cache use FIFO policy

2019-03-29 Thread Ma Lin
New submission from Ma Lin : Currently, when the cache is full, the entire cache is cleared. This patch let it use FIFO policy. Inada Naoki, Raymond Hettinger, could you review this patch? Thanks. No hurry, just do it when you have time. -- components: Library (Lib) messages: 339168