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

Head off invalidations in to_indices for NTuple{N,Int} #37021

Merged
merged 1 commit into from
Aug 14, 2020

Conversation

timholy
Copy link
Member

@timholy timholy commented Aug 13, 2020

The most common argument type for to_indices is a tuple of Int, yet we rely on the Integer fallback. This makes it vulnerable to invalidation by methods like this one which would rather convert non-Int integers. This prevents approximately 80 MethodInstance invalidations.

The most common argument type for `to_indices` is a tuple of `Int`,
yet we rely on the `Integer` fallback. This makes it vulnerable to
invalidation by methods like https://github.com/JuliaMath/Interpolations.jl/blob/bcd05a3f0843661104589c31da8d257fecdbe265/src/Interpolations.jl#L273
which would rather convert non-`Int` integers.
This prevents approximately 80 MethodInstance invalidations.
@timholy timholy added the compiler:latency Compiler latency label Aug 13, 2020
@JeffBezanson JeffBezanson merged commit 1a47fce into master Aug 14, 2020
@JeffBezanson JeffBezanson deleted the teh/to_indices branch August 14, 2020 20:18
simeonschaub pushed a commit to simeonschaub/julia that referenced this pull request Aug 29, 2020
The most common argument type for `to_indices` is a tuple of `Int`,
yet we rely on the `Integer` fallback. This makes it vulnerable to
invalidation by methods like https://github.com/JuliaMath/Interpolations.jl/blob/bcd05a3f0843661104589c31da8d257fecdbe265/src/Interpolations.jl#L273
which would rather convert non-`Int` integers.
This prevents approximately 80 MethodInstance invalidations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:latency Compiler latency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants