-
Notifications
You must be signed in to change notification settings - Fork 28
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
Make part of BenchmarkTools.jl? #9
Comments
cc @jrevels |
Just checked - this won't add any extra dependencies to BenchmarkTools on Julia 0.5+ 👍 |
I think this package definitely belongs inside BenchmarkTools in some form or as it is. The functions and macros in this package fall squarely in the category of "benchmark tools", and the current split doesn't feel very satisfying. I can make a PR to BenchmarkTools if @jrevels has no objections. |
I'm fine with merging the functionality here into BenchmarkTools (sorry for the late response). |
Note that I'm referring to the Compare the example in the README to how one would write it in native BenchmarkTools: module MyBenchmarks
# instantiate global state unbeknownst to naive users
using BenchmarkTools
# magically generate/push group to global state
@benchgroup "utf8" ["string", "unicode"] begin
teststr = UTF8String(join(rand(MersenneTwister(1), 'a':'d', 10^4)))
@bench "replace" replace($teststr, "a", "b")
@bench "join" join($teststr, $teststr)
end
end # module ...versus... module MyBenchmarks
using BenchmarkTools
# just tell users that `benchmarkpkg` will look for and execute MyBenchmarks.SUITE
const SUITE = BenchmarkGroup()
# hook up group explicitly, no magic
let g = addgroup!(SUITE, "utf8", ["string", "unicode"])
teststr = UTF8String(join(rand(MersenneTwister(1), 'a':'d', 10^4)))
g["replace"] = @benchmarkable replace($teststr, "a", "b")
g["join"] = @benchmarkable join($teststr, $teststr)
end
end # module It's true that the latter is slightly more verbose, but at the huge benefit (IMO) of transparency/explicitness/similarity to working with |
No matter where this functionality goes, it is good to have a larger group of people looking into benchmark tools for Julia. |
@jrevels, FYI, the benchmark macros are now removed, the way to use this pacakge now is by using the official BenchmarkToosl dict interface. |
Is the plan to move everything (specifically the |
Probably not. |
Don't think this will happen. |
In conversation with @shashi we were wondering if this package should just become part of BenchmarkTools.jl?
The text was updated successfully, but these errors were encountered: