You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for making this fantastic module! One of the many reasons I love Julia. :-)
I think it would be great if BenchmarkTools came with a macro to report the number of allocations (not bytes), i.e. like @ballocated, but return alloc(...).
This seems to work... maybe this can be considered for inclusion directly in this module?
macro ballocs(args...)
return esc(quote
$BenchmarkTools.allocs($BenchmarkTools.minimum($BenchmarkTools.@benchmark $(args...)))
end)
end
Hi, thanks for making this fantastic module! One of the many reasons I love Julia. :-)
I think it would be great if BenchmarkTools came with a macro to report the number of allocations (not bytes), i.e. like @ballocated, but return alloc(...).
This seems to work... maybe this can be considered for inclusion directly in this module?
I use it in my project ( https://github.com/claforte/RayTracingWeekend.jl )'s tests to keep the number of heap allocations to a minimum.
The text was updated successfully, but these errors were encountered: