Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⚡️ Avoid creating temporary expression in matrix multiplications #1866

Merged
merged 4 commits into from
Feb 15, 2019

Conversation

blegat
Copy link
Member

@blegat blegat commented Feb 15, 2019

With the benchmark in #1403 (comment):
Before:

julia> @time x*A;
0.559247 seconds (8.21 M allocations: 668.261 MiB, 40.98% gc time)

julia> @time A*x*A;
33.784054 seconds (14.60 M allocations: 9.227 GiB, 51.83% gc time)

After:

julia> @time x*A;
0.153061 seconds (210.03 k allocations: 73.168 MiB)

julia> @time A*x*A;
16.037227 seconds (630.06 k allocations: 6.126 GiB, 14.55% gc time)

src/quad_expr.jl Outdated Show resolved Hide resolved
@mlubin
Copy link
Member

mlubin commented Feb 15, 2019

Could we add this case to test/perf?

@blegat blegat merged commit 7426454 into master Feb 15, 2019
@mlubin mlubin deleted the bl/tmpmatmul branch February 15, 2019 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants