Last active
August 11, 2019 17:36
-
-
Save socantre/9597a38ece66058737eb to your computer and use it in GitHub Desktop.
CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!" functions to disable compiler optimization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void escape(void *p) { | |
asm volatile("" : : "g"(p) : "memory"); | |
} | |
static void clobber() { | |
asm volatile("" : : : "memory"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment