<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/benchmark/catch_optimizer.hpp, branch 0.2.0</title>
<subtitle>Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.</subtitle>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/'/>
<entry>
<title>Add optimizer barrier to benchmark calls of void-returning functions</title>
<updated>2026-08-22T18:43:13+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2026-08-22T13:19:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=45f9ea1e798c2e128dcba53602ccbddfe5676f6f'/>
<id>45f9ea1e798c2e128dcba53602ccbddfe5676f6f</id>
<content type='text'>
The goal is to do the equivalent of clobbering memory, which forces
the compiler to keep side effects that are external to the benchmarked
function, while allowing it to optimize inside the benchmarked function.

E.g. this cannot be optimized away:
```cpp
BENCHMARK("foo") {
    global_count += 1;
};
```

while this can:
```cpp
BENCHMARK("bar") {
    size_t local_count = 0;
    for (size_t i = 0; i &lt; 100; ++i) {
        local_count += 1;
    }
};
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The goal is to do the equivalent of clobbering memory, which forces
the compiler to keep side effects that are external to the benchmarked
function, while allowing it to optimize inside the benchmarked function.

E.g. this cannot be optimized away:
```cpp
BENCHMARK("foo") {
    global_count += 1;
};
```

while this can:
```cpp
BENCHMARK("bar") {
    size_t local_count = 0;
    for (size_t i = 0; i &lt; 100; ++i) {
        local_count += 1;
    }
};
```
</pre>
</div>
</content>
</entry>
<entry>
<title>fn need to be in parenthesis </title>
<updated>2023-11-16T11:33:35+00:00</updated>
<author>
<name>Sergei Iskakov</name>
</author>
<published>2023-11-15T15:09:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=de7ba4e8897bbe56c612b980d02f249a92d0eada'/>
<id>de7ba4e8897bbe56c612b980d02f249a92d0eada</id>
<content type='text'>
Otherwise intel c++ 19.1 cause an error
"expression preceding parentheses of apparent call must have (pointer-to-) function type CATCH2"</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise intel c++ 19.1 cause an error
"expression preceding parentheses of apparent call must have (pointer-to-) function type CATCH2"</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for the IAR compiler</title>
<updated>2023-03-08T19:55:41+00:00</updated>
<author>
<name>jushar</name>
</author>
<published>2023-03-08T12:14:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=3220ae6d4aff68edb27fa6b34d2e4f909a770e19'/>
<id>3220ae6d4aff68edb27fa6b34d2e4f909a770e19</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix references to license file</title>
<updated>2022-10-28T09:30:15+00:00</updated>
<author>
<name>Lars Toenning</name>
</author>
<published>2022-10-28T09:22:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=f1084fb30990fe40c8f5b70034970c7eb4e1da72'/>
<id>f1084fb30990fe40c8f5b70034970c7eb4e1da72</id>
<content type='text'>
The license file was renamed with 6a502cc2f5fedd59b3495b58708f0d6d987ed9e1
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The license file was renamed with 6a502cc2f5fedd59b3495b58708f0d6d987ed9e1
</pre>
</div>
</content>
</entry>
<entry>
<title>Prefer _t over ::type form for std type traits</title>
<updated>2021-08-18T22:21:13+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2021-08-16T15:01:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=edad4d0af7a91693448bbf884236ea6ff2a4bd15'/>
<id>edad4d0af7a91693448bbf884236ea6ff2a4bd15</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace uses of std::move and std::forward with macros</title>
<updated>2021-08-16T14:22:19+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2021-08-13T12:16:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=d2ee7100d26128b3956571cc802f3a52c9b9aea8'/>
<id>d2ee7100d26128b3956571cc802f3a52c9b9aea8</id>
<content type='text'>
This improves the SelfTest build times by about 3% (measured
with Clang 10 on random Linux box I had lying around).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This improves the SelfTest build times by about 3% (measured
with Clang 10 on random Linux box I had lying around).
</pre>
</div>
</content>
</entry>
<entry>
<title>Add standardized copyright notice + SPDX identifier to source files</title>
<updated>2020-08-30T13:43:45+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-08-30T13:43:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=90aeffb97d6942d16f75a56b11e10fc0b010995a'/>
<id>90aeffb97d6942d16f75a56b11e10fc0b010995a</id>
<content type='text'>
This should also be done for test files, but that has lower priority.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should also be done for test files, but that has lower priority.
</pre>
</div>
</content>
</entry>
<entry>
<title>Standardize include guard patterns to FILE_NAME_EXTENSION_INCLUDED</title>
<updated>2020-08-30T12:09:27+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-08-29T18:48:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=a822cb9717b64b3b17047fe1ab4dc727c2ff39c4'/>
<id>a822cb9717b64b3b17047fe1ab4dc727c2ff39c4</id>
<content type='text'>
This commit also strips the old copyright comment header in touched
files, as those will also be replaced with a more standardized and
machine-friendly version.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit also strips the old copyright comment header in touched
files, as those will also be replaced with a more standardized and
machine-friendly version.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove CATCH_CONFIG_ENABLE_BENCHMARKING compilation toggle</title>
<updated>2020-02-06T10:36:46+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2020-02-03T17:08:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=cd7d7a1c67f1b915d883fa7979cbd2162dde7d46'/>
<id>cd7d7a1c67f1b915d883fa7979cbd2162dde7d46</id>
<content type='text'>
Now that Catch2 is a proper library, we can always build the full
library (comparatively minor slowdown) and the user can avoid
including benchmarking headers to avoid the compilation slowdown.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that Catch2 is a proper library, we can always build the full
library (comparatively minor slowdown) and the user can avoid
including benchmarking headers to avoid the compilation slowdown.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move files into catch2/ subdir</title>
<updated>2019-11-30T16:30:32+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2019-11-30T16:30:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=4385951a55cf09b212e863c3d44951c936155c1c'/>
<id>4385951a55cf09b212e863c3d44951c936155c1c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
