Skip to content
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

Feature for just running the code without benchmarking #300

Open
gaurav-arya opened this issue Feb 2, 2023 · 1 comment
Open

Feature for just running the code without benchmarking #300

gaurav-arya opened this issue Feb 2, 2023 · 1 comment

Comments

@gaurav-arya
Copy link

gaurav-arya commented Feb 2, 2023

BenchmarkTools.jl has some special syntax for string interpolation, plus the setup block, etc.

Often I'm @btime'ing something and then I just decide to run it once and simply remove the @btime, but this of course errors, and I need to revise it back to a version that doesn't use any special syntax. As a convenience, it would be nice to have a macro like @runonce which just runs the function once and gives the output, but accepts the special syntax.

@gdalle
Copy link
Collaborator

gdalle commented Jun 13, 2023

You can do

@btime f($x, $y) evals=1 samples=1

and just tweak the number of samples instead of adding and removing @btime. Does that solve your problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants