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

@nospecialize slows down first time inference #64

Open
Roger-luo opened this issue Jun 7, 2020 · 1 comment
Open

@nospecialize slows down first time inference #64

Roger-luo opened this issue Jun 7, 2020 · 1 comment

Comments

@Roger-luo
Copy link
Contributor

Roger-luo commented Jun 7, 2020

I notice the use of @nospecialize slows down the first time inference when using IRTools functions (e.g Pipe, update!) a lot, not sure why

# without nospecialize
6.351286 seconds (10.75 M allocations: 572.988 MiB, 5.41% gc time)
# with nospecialize
7.406211 seconds (14.54 M allocations: 773.888 MiB, 5.02% gc time)

I suspect this is also causing other things (like Zygote) to be extremely slow for the first run.

@Roger-luo
Copy link
Contributor Author

You could reproduce this via this branch: QuantumBFS/YaoLang.jl#25

using

julia --project precompile.jl

in the project folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant