Eric

Results 40 comments of Eric

*Actually don't declare the variable as const. Woops. If you want to provide `MakeUnpredictable` as a wrapper for `DoNotOptimize` with a different interface that would be OK too.

No, Clang and GCC both generate `div` instructions. https://godbolt.org/g/76Rz4K

No, because you don't always want to escape the stack address of a variable. Sometimes you just want to escape/consume its value. `DoNotOptimize` is tricky, but so is the optimizer.

I think the trickiness of the API is a good reason to provide a `MakeUnpredictable` so we can handle the pitfalls correctly for users.

It's been a year, but I finally have a patch ready: https://github.com/efcs/benchmark/tree/make-unpredictable Just waiting on PR #530 to land first.

`compare_benchs.py` is a pretty small script. I would add another different script. But try to use and expand the existing python library.

When warnings provide no value turning them off is a great solution.

Oh, good question. After some testing this appears to only reproduce inside Intellij's builtin terminal implementation. It does not seem to reproduce with gnome's terminal implementation. I'm not sure exactly...

Ah, sorry I just saw your commit. Here's some of the information you need... You can find a video of the bug & fix [here](https://public.efcs.us/term-vid.html) Here's the code I used...

@davep Let me know if I can provide more.