-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
performanceMust go fasterMust go faster
Description
Compare:
v = randn(728, 600)
w = randn(70, 728)
@time w * v # 0.017802 seconds (2 allocations: 328.172 KiB)
with:
v_ = reshape(reshape(v', 600, 728)', 728, 600)
w_ = reshape(reshape(w', 728, 70)', 70, 728)
@time w_ * v_ 0.161401 seconds (5 allocations: 358.922 KiB)
The second one is 10x slower. Note that the underlying data in memory is exactly the same, and with the same layout.
Can the reshape / adjoint type signature be simplified here?
Metadata
Metadata
Assignees
Labels
performanceMust go fasterMust go faster