-
Notifications
You must be signed in to change notification settings - Fork 102
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
$x should become $(Ref(x))[]? #205
Comments
+1 for a more convenient syntax, but I'm not sure whether |
Individual macros can do whatever they want with interpolation syntax; it doesn't have to be limited to expression interpolation. |
Of course you can write a macro such that A concrete example where (I believe) the proposed syntax would be problematic is |
Would #130 alone solve this? Or can this pop up in more complex functions? |
#130 is just a warning. I'm suggesting that BenchmarkTools should just fix this automatically by automatically wrapping every interpolated expression in a |
In cases where you want to literally interpolate into the benchmark expression, you could use |
Is this solved via #30 and #265? Currently, here's the same example:
|
It's a bit annoying when you have to use this convoluted
Ref
trick to prevent the compiler from constant-folding the whole calculation (ala #130):It would be nicer if we could just use
@btime exp($1)
and the$
did the trick automatically.(Another case just came up on discourse. cc @stillyslalom)
The text was updated successfully, but these errors were encountered: