Message224981
Le 06/08/2014 21:19, Raymond Hettinger a écrit :
>
> I don't think so at all. The LRU cache we have now is plenty
> efficient
for its intended use cases (caching I/O bound functions and expensive
functions). If is only unsuitable for functions that are already
blazingly fast.
This is an unrealistic simplification. Many functions can be either
expensive or blazingly fast, depending on their input (typical examples
are re.compile(), math.factorial()...). But the decision of applying the
lru_cache decorator is a compile-time binary decision: it cannot encode
the varying properties of the function depending on its inputs. |
|
Date |
User |
Action |
Args |
2014-08-07 01:51:22 | pitrou | set | recipients:
+ pitrou, rhettinger, jcea, amaury.forgeotdarc, scoder, giampaolo.rodola, ezio.melotti, asvetlov, poke, skrah, meador.inge, anacrolix, Aaron.Meurer, BreamoreBoy, eric.snow, serhiy.storchaka, brechtm, kachayev, josh.r |
2014-08-07 01:51:22 | pitrou | link | issue14373 messages |
2014-08-07 01:51:22 | pitrou | create | |
|