JuliaLang/julia — pull request #7483 by tanmaykm (2014-07-01 09:51:43+00:00)
Title: sparse indexing tweaks

This adds some tweaks to improve performance of sparse matrix indexing.

The gains are mostly from using `@inbounds` where possible. The members of the `SparseMatrixCSC` instance passed are assumed to have the correct data. The indices passed are bounds checked.

A few other changes:
- `@simd` at a few places
- `deleteat!` to truncate instead of subsetting
- avoid an allocation in `reinterpret` and `reshape`

Running the existing perf tests, I get around 10-20% gain in most cases: https://gist.github.com/tanmaykm/1dbc3d88680bfed3bd1a#file-diff_percent-txt