Skip to content

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

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

Closed
wants to merge 1 commit into 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 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
@nsajko nsajko closed this Jul 14, 2024
@nsajko nsajko deleted the reimplement_map branch July 14, 2024 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collections Data structures holding multiple items, e.g. sets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants