Closed
Description
I was doing some profiling on isel
, and see there are some properties that (I think) never change, but are called frequently. Should we cache these on their object?
Pandas uses cache_readonly for these cases.
Here's a case: we call LazilyOuterIndexedArray.shape
frequently when doing a simple indexing operation. Each call takes ~150µs. An attribute lookup on a python object takes ~50ns (i.e. 3000x faster). IIUC the result on that property should never change.
I don't think this is the solution to performance issues, and there's some additional complexity.
Could they be easy & small wins, though?