Commit 716d5ce
committed
[SYSTEMDS-3805] Minor performance improvement scalar right indexing
For operations like as.scalar(data[i,1]), we now use a fast path which
improved the performance for 10M iterations as follows:
1 rightIndex 5.513 10000000 (old)
1 rightIndex 4.717 10000000 (new)
This is generally useful also for cases where there is no as.scalar.
However, for the case as.scalar(data[i,1]) we should directly compile
a new rixScalar instruction which look up the value, avoids matrixblock
allocation, and gets rid of unnecessary createvar, cast, and rmvar
instructions.1 parent 0242557 commit 716d5ce
File tree
1 file changed
+6
-1
lines changed- src/main/java/org/apache/sysds/runtime/instructions/cp
1 file changed
+6
-1
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
68 | 73 | | |
69 | | - | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
| |||
0 commit comments