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

reimplement the recursive variant of map(::Any, ::Tuple) #54490

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nsajko
Copy link
Contributor

@nsajko nsajko commented May 16, 2024

Return type inference improvement example:

f(g, t::Tuple) = invoke(map, Tuple{Any,Tuple}, g, t)
Core.Compiler.return_type(f, Tuple{typeof(sqrt),Tuple{Vararg{Int}}})
 # master: `Tuple{Float64, Vararg{Any}}`
 # PR:     `Tuple{Vararg{Float64}}`

FTR, this PR is part of a series of changes which (re)implement many of the operations on tuples using a new recursive technique. The ultimate goal is to hopefully increase the value of the loop-vs-recurse cutoff (Any32, sometimes hardcoded 32) for tuple operations.

Return type inference improvement example:

```julia
f(g, t::Tuple) = invoke(map, Tuple{Any,Tuple}, g, t)
Core.Compiler.return_type(f, Tuple{typeof(sqrt),Tuple{Vararg{Int}}})
 # master: `Tuple{Float64, Vararg{Any}}`
 # PR:     `Tuple{Vararg{Float64}}`
```

FTR, this PR is part of a series of changes which (re)implement many of
the operations on tuples using a new recursive technique. The ultimate
goal is to hopefully increase the value of the loop-vs-recurse cutoff
(`Any32`, sometimes hardcoded `32`) for tuple operations.
@nsajko nsajko added compiler:inference Type inference domain:collections Data structures holding multiple items, e.g. sets labels May 16, 2024
@aviatesk aviatesk removed the compiler:inference Type inference label May 17, 2024
@nsajko nsajko marked this pull request as draft May 17, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:collections Data structures holding multiple items, e.g. sets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants