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

type application doesn't infer as consistent #54410

Open
nsajko opened this issue May 8, 2024 · 1 comment
Open

type application doesn't infer as consistent #54410

nsajko opened this issue May 8, 2024 · 1 comment
Labels
compiler:effects effect analysis performance Must go faster

Comments

@nsajko
Copy link
Contributor

nsajko commented May 8, 2024

julia> struct S{T<:Tuple{Vararg{Nothing}}} end

julia> f() = S{<:Tuple{Vararg{Nothing}}}
f (generic function with 1 method)

julia> Base.infer_effects(f, Tuple{})
(?c,+e,!n,+t,+s,+m,+u)

julia> versioninfo()
Julia Version 1.12.0-DEV.489
Commit 29ced9e2a02 (2024-05-08 07:57 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × AMD Ryzen 3 5300U with Radeon Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-17.0.6 (ORCJIT, znver2)
Threads: 6 default, 0 interactive, 6 GC (on 8 virtual cores)

Older Julia versions have even worse effect inference for f.

@nsajko nsajko added performance Must go faster compiler:effects effect analysis labels May 8, 2024
@vtjnash
Copy link
Sponsor Member

vtjnash commented May 8, 2024

This relates to a recent type egal question/bug: since each TypeVar is semantically distinct, the computation here is indeed !c, even though we then do cause and permit the UnionAll wrapped object returns here to be egal for all calls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:effects effect analysis performance Must go faster
Projects
None yet
Development

No branches or pull requests

2 participants