Skip to content

Commit ebfb715

Browse files
committed
Micro optimization indexing using tuples instead of lists
Since Python 3.X (i can't remember which) tuple concatenation like this is fast since python inspects the tuple usage and knows that it is the last reference and reuses the underlying c object. The change to LazilyIndexedArray is that `shape` is repeatidely accessed throughout the codebase (ndim, and shape are heavily used) and thus we benefit from pre-computing this at creation time.
1 parent 2fd3b8b commit ebfb715

File tree

1 file changed

+96
-89
lines changed

1 file changed

+96
-89
lines changed

0 commit comments

Comments
 (0)