Skip to content

Commit

Permalink
Workaround for performance penalty of splatting a number (#33108)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf authored and andreasnoack committed Aug 29, 2019
1 parent 9a8b2fd commit 4bf946a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stdlib/LinearAlgebra/src/generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ julia> C
```
"""
@inline @propagate_inbounds function _modify!(p::MulAddMul{ais1, bis0},
x, C, idx) where {ais1, bis0}
x, C, idx′) where {ais1, bis0}
# Workaround for performance penalty of splatting a number (#29114):
idx = idx′ isa Integer ? (idx′,) : idx′
if bis0
C[idx...] = p(x)
else
Expand Down

0 comments on commit 4bf946a

Please sign in to comment.