-
Notifications
You must be signed in to change notification settings - Fork 22
Replace BenchmarkTools.jl with Chairmarks.jl in Optimizing #138
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
base: main
Are you sure you want to change the base?
Replace BenchmarkTools.jl with Chairmarks.jl in Optimizing #138
Conversation
\advanced{ | ||
Certain computations may be [optimized away by the compiler]((https://juliaci.github.io/BenchmarkTools.jl/stable/manual/#Understanding-compiler-optimizations)) before the benchmark takes place. | ||
If you observe suspiciously fast performance, especially below the nanosecond scale, this is very likely to have happened. | ||
} |
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.
This can now be removed (or updated for Chairmarks @LilithHafner ?).
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.
It's always possible to optimize away computation unintentionally
julia> @btime 10+20+30+40+50
1.167 ns (0 allocations: 0 bytes)
150
julia> @b 10+20+30+40+50
1.241 ns
Using Chairmarks does not mean we no longer need to worry about this.
Also, BenchmarkTools.jl's docs are great for this. Chairmarks does not have a better alternative.
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 readers might be confused by a link to BenchmarkTools in what is now a section about Chairmarks.
If this is crucial information and Chairmarks replaces BenchmarkTools, maybe the Chairmarks docs should mirror the contents?
If this is not crucial, maybe we should remove it from MoJuWo entirely.
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.
Maybe just clarify that the explanation from BenchmarkTools applies here too
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.
Thanks for this contribution! I rephrased it in a slightly less opinionated way, because I think BenchmarkTools is far from dead
\advanced{ | ||
Certain computations may be [optimized away by the compiler]((https://juliaci.github.io/BenchmarkTools.jl/stable/manual/#Understanding-compiler-optimizations)) before the benchmark takes place. | ||
If you observe suspiciously fast performance, especially below the nanosecond scale, this is very likely to have happened. | ||
} |
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.
Maybe just clarify that the explanation from BenchmarkTools applies here too
Co-authored-by: Guillaume Dalle <[email protected]>
Closes #133.