Closed Magalame closed 5 years ago
Should I open an issue for the vector
folks then?
Also, indeed!
I don't thuink it's good issue for vector in its current form. It's of kind "for some reason stream fusion seems to not fire". I don't think vector have resources for tracking down such vague issues. Esp. since rule based fusion is somewhat fragile
Understanding why and where fusion rules fire and where they don't is an interesting exercise for a rainy Sunday ;) , for now I'll merge this PR and perhaps soon we can start looking into cutting a new release of dense-linear-algebra
and statistics
@Shimuuar
This gets rid of the temporary vector that
U.enumFromStepN
was allocating. This vector was seemingly preventing stream fusion to occur inmultiply
. According to the benchmarks from #56, on 100100 matrices, the newcolumn
is twice as fast, allocates half as much memory, andmultiply
goes from allocating 17,040,080 bytes to 80,080 (when multiply is not* inlined, ~240 000 when it is) and is a bit less than two times faster. With the llvm backend, it's well within the range of a naive C implementation.