Implement ClobberMemory() and fix DoNotOptimize on MSVC. (#352)
I recently learned Windows provides a function called _ReadWriteBarrier
which is literally ClobberMemory under a different name. This patch
uses it to implement ClobberMemory under MSVC.
diff --git a/README.md b/README.md
index 456b0a6..4446637 100644
--- a/README.md
+++ b/README.md
@@ -365,7 +365,7 @@
}
```
-Note that `ClobberMemory()` is only available for GNU based compilers.
+Note that `ClobberMemory()` is only available for GNU or MSVC based compilers.
### Set time unit manually
If a benchmark runs a few milliseconds it may be hard to visually compare the