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

Add @check_allocs_call #46

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jkrumbiegel
Copy link

Draft implementation for #45

Not sure about keyword arguments, but they aren't mentioned in check_allocs either. And I haven't added any tests, yet.

passed to `func` in the function call expression that `@check_allocs_call` is applied to.
For example, `@check_allocs_call 1 + 2.0` is equivalent to `check_allocs(+, (Int, Float64))`.
"""
macro check_allocs_call(ex...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be a method/variant of @check_allocs. There is precedent for that with e.g. @timeit from TimerOutputs.jl: when applied to a function definition expression it enables timings for all calls, when applied to a call expression it times just that call.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, I wasn't aware this was being done elsewhere but seems relatively straightforward to explain, with no specific edge cases I could think of

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

Successfully merging this pull request may close these issues.

2 participants