JuliaLang / JuliaLang/AllocCheck.jl

Call-site macro

Open
#45 4 comments 7 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
255
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Came up [on discourse](https://discourse.julialang.org/t/ann-alloccheck-jl-static-code-analysis-to-prove-allocation-free-behavior/106414/8?u=carstenbauer).

Would be nice to have a macro that is similar to `@code_*` and others and that can be used like

```julia
@check_allocs multiply(rand(10,10), rand(10,10))
```

rather than having to augment the method definition (and run the allocation check on every call). I assume this is straightforward given that there already is the `check_allocs` function that works on the function signature alone.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the existing check_allocs function, which the issue says already accepts a function signature, and compare it with the @check_allocs call-site example. The work is complete when the macro accepts an expression such as multiply(rand(10,10), rand(10,10)) and performs the allocation check without requiring a method definition change.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.