Some of the more computer intensive functions could make use of memoization/caching.
Hashing pandas and numpy arrays is key to this
https://stackoverflow.com/questions/16589791/most-efficient-property-to-hash-for-numpy-array
https://stackoverflow.com/questions/31567401/get-the-same-hash-value-for-a-pandas-dataframe-each-time
The memoization/caching function will simply be a dict that uses the hash as a key and returns the item.
looks useful, though it seems like this would be difficult to extend to dataframes? with the numpy arrays you can convert the array to a hashable tuple and then convert it back, pd.util.hash_pandas_object wouldn't let you convert back to the unhashed object. is it possible to convert the dataframe differently so that we could undo it, or possibly ignore arguments passed to lru_cache (i.e. pass both the hashed and the unhashed df and ignore the unhashed during caching, but use the unhashed in the function)
Hashing is only used for indexing in the dict the daraframe or other pandas object would be stored as is. What were you thinking of doing @gramhagen ?
oh, are you thinking we can rewrite the underlying hashing approach inside lru_cache?
Yes
addressed in #713
Most helpful comment
addressed in #713