Closed breznak closed 9 years ago
@breznak, it could be a rather severe performance penalty to have fastcache check the type of every argument and to see if it's an ndarray. It certainly something that someone could do on a per-project basis by wrapping clru_cache. As an example, you can take a look at the python wrapper lru_cache.
That makes sense, closing. Thanks!
Hello, I'd like to use fastcache for my code, but my function is using ndarray.
the decorator
@clru_cache
cannot be used for functions withnumpy.array()
arguments, as those can't be hashed directly. We must hash the underlying buffer:This would have some overhead but should make it more convenient to use your library for these data. Thanks