julia
d1b1d848 - implement SubArray reindexing without using `@generated` (#58800)

Commit
59 days ago
implement SubArray reindexing without using `@generated` (#58800) The tuple specialization for indexing with UnitRanges is highly optimized, type stable, and constant foldable for statically known values like these. Seems like a very good thing to just lean on that. It's how I would've written this in the first place had that optimized method existed when I wrote it. It's much more readable and — I imagine — it should be quite a bit friendlier to the compiler. The only time you should see a performance difference here is when you have a SubArray with 11 or more indices **and** one of those indices is 3-dimensional or more.
Author
Parents
Loading