-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add @ballocations
macro for getting number of allocations
#292
base: master
Are you sure you want to change the base?
Conversation
@ballocs
macro for getting number of allocations@ballocations
macro for getting number of allocations
bump :) is someone available to review this please? |
I don't really understand the purpose of this macro and the |
yeah, i think it probably is. And i intended to use it like the purpose is to have a standard, easy-to-use way to test the number of allocations (ignoring the compilation) since but i think setting default |
i hope to use it the same way running these functions many times is no issue (since they're written to be basically no cost), but it's a lot nicer (i.e. less burden on the package developers writing the tests) to use |
Sounds like a good idea to me, although it will have to be thoroughly documented for users not to be surprised. |
and accepts all of the same additional parameters as `@benchmark`. | ||
The returned allocations correspond to the trial with | ||
the *minimum* elapsed time measured during the benchmark. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we set a default value evals=1 samples=2
for this one? And explain it in the docstring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then again it would be incoherent with the other @bstuff
macros so I'm torn
@allocations
macro recently added to Julia Base (Add@allocations
macro for getting number of allocations JuliaLang/julia#47367)