Commit 3bb4539
committed
Perform fancy indexing on csr_matrices
Rather than expanding the full csr_matrix into a numpy array, then
performing fancy indexing on that, do the reverse: perform the
fancy indexing on the csr_matrix, and then expand it into a numpy
array.
This has the potential to save huge amounts of computing time, since
we do not have to create the entire dense array before performing
the indexing.
For the multiruby test case, this did not show any change to the
performance. However, for a monolithic Eiger example from Josh Ward,
it showed a 5x speed improvement.
Signed-off-by: Patrick Avery <[email protected]>1 parent 70ce7f4 commit 3bb4539
File tree
3 files changed
+15
-3
lines changed- hexrd
- imageseries/load
- instrument
3 files changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
213 | 220 | | |
214 | 221 | | |
215 | 222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1723 | 1723 | | |
1724 | 1724 | | |
1725 | 1725 | | |
1726 | | - | |
| 1726 | + | |
1727 | 1727 | | |
1728 | 1728 | | |
1729 | 1729 | | |
| |||
1792 | 1792 | | |
1793 | 1793 | | |
1794 | 1794 | | |
1795 | | - | |
| 1795 | + | |
1796 | 1796 | | |
1797 | 1797 | | |
1798 | 1798 | | |
| |||
0 commit comments