Skip to content

Conversation

nathanrboyer
Copy link
Contributor

Closes #133.

Comment on lines 87 to 90
\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.
}
Copy link
Collaborator

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 ?).

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.

Copy link
Collaborator

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.

Copy link
Collaborator

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

Copy link
Collaborator

@gdalle gdalle left a 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

Comment on lines 87 to 90
\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.
}
Copy link
Collaborator

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

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

Successfully merging this pull request may close these issues.

Clarify global variable interpolation in benchmarking.
4 participants