julia
16339344 - Specialize `fill!` for `Lower`/`UpperTriangular` (#52570)

Commit
2 years ago
Specialize `fill!` for `Lower`/`UpperTriangular` (#52570) Only looping over the triangular part provides a performance boost: ```julia julia> U = UpperTriangular(rand(3000,3000)); julia> @btime zero($U); 23.575 ms (3 allocations: 68.66 MiB) # master 15.739 ms (3 allocations: 68.66 MiB) # PR ``` This is only really applicable when filling a triangular matrix with zeros, but this has several applications (e.g. imaginary part of a real matrix). --------- Co-authored-by: Daniel Karrasch <daniel.karrasch@posteo.de>
Author
Parents
Loading