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
further latency reductions #447
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be good to document the use of @nospecialize
somewhere in the docs: Why it's there, what it does, and when/how to use it yourself. Maybe in the performance section?
Also, did you time how much this saves?
Good suggestion! I added some explanation to the docs. Here are some timings I get from running julia16 --threads=1 --check-bounds=no -e '@time using Trixi; @time trixi_include("examples/2d/elixir_advection_amr.jl"); @time trixi_include("examples/2d/elixir_euler_ec.jl"); @time trixi_include("examples/2d/elixir_mhd_blast_wave.jl", tspan=(0.0, 1.0e-3))' three times.
|
Not trying to be unpopular, but I am wondering if this optimization is really worth it. As far as I can tell, it's at best a ~3% improvement in startup time, while the code noise grows considerably with these |
I don't insist on merging this as it is. Just another data point: Precompiling Trixi on Alternatively, we can also just delete the |
Hm. Yeah, I also noticed the slowdown in precompilation. The above improvement sounds better, but I am still not sure if it's worth it. I'll try to get a hold of the others today. |
I will move @nospecialize stuff # reduce precompilation time |
Could you please review this again, @sloede? |
Additionally, this tests whether renaming
master
tomain
worked as expected.