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

support $x variable interpolation #62

Closed
stevengj opened this issue Mar 4, 2024 · 2 comments · Fixed by #63
Closed

support $x variable interpolation #62

stevengj opened this issue Mar 4, 2024 · 2 comments · Fixed by #63

Comments

@stevengj
Copy link

stevengj commented Mar 4, 2024

It would be nice if the @b macro supported $x interpolation of globals and other expressions into benchmarked expressions, to make it easier to benchmark expressions using global data without using @eval and without writing a function.

This is a widely used feature of BenchmarkTools / @btime … why not copy it?

@LilithHafner
Copy link
Owner

I don't know how to do interpolation without memory leaks. 😿

Explanation in the docs: https://chairmarks.lilithhafner.com/stable/migration/#footnote-1
Julia issue at the root of this: JuliaLang/julia#14495
Corresponding issue in BenchmarkTools.jl: JuliaCI/BenchmarkTools.jl#339

In theory it would be possible to support interpolation with memory leaks & non-interpolation without memory leaks. I'll look into that.

@LilithHafner
Copy link
Owner

Okay, I think I figured it out. PR forthcoming 🐱

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 a pull request may close this issue.

2 participants