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

Threads.resize_nthreads! can take a significant time to infer #40630

Open
KristofferC opened this issue Apr 27, 2021 · 0 comments
Open

Threads.resize_nthreads! can take a significant time to infer #40630

KristofferC opened this issue Apr 27, 2021 · 0 comments
Labels
compiler:latency Compiler latency

Comments

@KristofferC
Copy link
Member

KristofferC commented Apr 27, 2021

Looking at some package load time I saw quite a bit of time is spent in inferring Threads.resize_nthreads!.

For example, loading HTTP.jl takes:

julia> @time using HTTP
  0.323988 seconds (1.04 M allocations: 63.554 MiB, 2.47% gc time, 1.98% compilation time)

on 1.6 for me. Remove the resize_nthreads! calls in HTTP.jl (and URIs.jl) makes it take:

 julia> @time using HTTP
  0.085508 seconds (66.35 k allocations: 6.057 MiB, 2.88% compilation time)

Maybe the deepcopy in the function makes it expensive to infer?

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

No branches or pull requests

1 participant