-
Notifications
You must be signed in to change notification settings - Fork 102
Open
Labels
Description
Results like
julia> using BenchmarkTools
julia> foo(x) = exp(x)
foo (generic function with 1 method)
julia> @btime foo(1)
0.029 ns (0 allocations: 0 bytes)
2.718281828459045
confuse many discussions on the discourse forum and have limited real-world applicability.
Perhaps for timings below some threshold (eg 1ns, or something calculated from the CPU frequency, as much as that is meaningful) a warning could be printed indicating that the result is not necessarily meaningful in a nontrivial context.
jrevels, ararslan, maxbennedich, PallHaraldsson and gdalle