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

fix perf regression from not specializing on iterate on tuples #29133

Merged
merged 1 commit into from
Sep 12, 2018

Conversation

KristofferC
Copy link
Sponsor Member

@KristofferC KristofferC commented Sep 11, 2018

Fixes #28764 (comment).

cc @haampie

perf_setindex!(A, val, inds) = setindex!(A, val, inds...)

using BenchmarkTools
s = 2
A = rand(Float64, ntuple(one, s)...)
y = one(eltype(A))
i = length(A)
@btime perf_setindex!($(fill!(A, y)), $y, $i)

Before:

1.308 μs (8 allocations: 336 bytes)

After:

570.000 ns (8 allocations: 336 bytes)

@KristofferC
Copy link
Sponsor Member Author

@nanosoldier runbenchmarks("array", vs = ":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

@vtjnash
Copy link
Sponsor Member

vtjnash commented Sep 12, 2018

This is strange—inference isn’t supposed to look at this flag. It would be helpful to understand what inlining decisions got made and why, as this might be indicating a deeper problem.

@KristofferC
Copy link
Sponsor Member Author

Since 1.0.1 is imminent and this fixes a regression (just restores things back to how things where not too long ago). I'll merge this so we can get 1.0.1 out and open an issue so we can continue tracking this.

@KristofferC KristofferC merged commit 2cd1bf8 into master Sep 12, 2018
@KristofferC KristofferC deleted the kc/fix_reg branch September 12, 2018 14:40
KristofferC added a commit that referenced this pull request Sep 12, 2018
@KristofferC KristofferC mentioned this pull request Sep 12, 2018
vtjnash added a commit that referenced this pull request Dec 3, 2018
Reimplement a larger portion of the optimizations in jl_f__apply
in the fallback function, so we can reduce the performance wall in more cases.

General fix for #29133-like performance issues
vtjnash added a commit that referenced this pull request Dec 5, 2018
Reimplement a larger portion of the optimizations in jl_f__apply
in the fallback function, so we can reduce the performance wall in more cases.

General fix for #29133-like performance issues
jrevels pushed a commit that referenced this pull request Dec 31, 2018
Reimplement a larger portion of the optimizations in jl_f__apply
in the fallback function, so we can reduce the performance wall in more cases.

General fix for #29133-like performance issues
KristofferC added a commit that referenced this pull request Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants