Commit f0e36ea
authored
Simplify logic in Diagonal-Tridiagonal multiplication (#1338)
This improves performance in small `::Diagonal * ::Tridiagonal`
multiplications:
```julia
julia> D = Diagonal(1:3); T = Tridiagonal(1:2, 1:3, 1:2); C = similar(T);
julia> @Btime mul!($C, $D, $T);
43.435 ns (0 allocations: 0 bytes) # master
14.725 ns (0 allocations: 0 bytes) # this PR
```
This also improves TTFX
```julia
julia> @time mul!(C, D, T);
0.192970 seconds (451.55 k allocations: 22.211 MiB, 99.99% compilation time) # master
0.129910 seconds (273.38 k allocations: 13.351 MiB, 99.98% compilation time) # this PR
```1 parent 7f354f4 commit f0e36ea
1 file changed
+10
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1186 | 1186 | | |
1187 | 1187 | | |
1188 | 1188 | | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
1196 | | - | |
1197 | 1189 | | |
1198 | 1190 | | |
1199 | 1191 | | |
1200 | 1192 | | |
1201 | 1193 | | |
1202 | 1194 | | |
1203 | | - | |
1204 | | - | |
1205 | | - | |
1206 | | - | |
1207 | | - | |
1208 | | - | |
1209 | | - | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
1210 | 1200 | | |
1211 | 1201 | | |
1212 | 1202 | | |
1213 | 1203 | | |
1214 | 1204 | | |
1215 | | - | |
1216 | | - | |
1217 | | - | |
1218 | | - | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
1222 | 1210 | | |
1223 | 1211 | | |
1224 | 1212 | | |
| |||
0 commit comments