-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
@noopt macro for avoiding optimizations #29817
Comments
|
Is that really enough?
I want the compiler to assume that |
My favourite line is:
But there are two separate concerns here. |
We do need The other flavor, or another modifier [what which one is theoretically best] that captures the notion of "Please do what you can to take this stellar code to the next level of stellar without monkeying about with this line/ these few lines / this little section; that's the only way to preserve the design semantics." |
Should probably be put inside a benchmarking package. |
I had wanted this for general use with writing parts of numerical code that must not be reorganized or optimized away by the compiler. It would be problematic to have to depend upon a benchmarking package for this. |
Could you give an example? An optimization is not supposed to be observable. |
For e.g. benchmarking purposes it would be convenient to have a
@noopt
macro or something that would instruct the compiler not to optimize something. For example, the google benchmark suite has the following codehttps://github.com/google/benchmark/blob/d8c0f27448dfad95b94285e612bba1f7c55c9dd0/include/benchmark/benchmark.h#L304-L347
(also see https://www.youtube.com/watch?v=nXaxk27zwlk&feature=youtu.be&t=2441 as the comment links to)
It would be useful to have something similar in Julia.
The text was updated successfully, but these errors were encountered: