<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/internal/catch_clara.cpp, branch constexpr_approx</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>Move-enable various parts of TextFlow</title>
<updated>2023-12-27T20:43:49+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-12-27T20:43:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=b52d97855d794175e69abc6f0eceee9ec3c1bd0e'/>
<id>b52d97855d794175e69abc6f0eceee9ec3c1bd0e</id>
<content type='text'>
This removes about 200 pointless copies from printing the help
message (the original motivation for the change), and also nicely
improves performance of the various reporters that depend on
TextFlow.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes about 200 pointless copies from printing the help
message (the original motivation for the change), and also nicely
improves performance of the various reporters that depend on
TextFlow.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid copying TokenStreams while parsing</title>
<updated>2023-12-27T20:14:12+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-12-27T20:11:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=eaafd076743407e930a11297425f33c1f78220b0'/>
<id>eaafd076743407e930a11297425f33c1f78220b0</id>
<content type='text'>
The code is now even worse mess than before, due to the ad-hoc
implementation of Result-ish type based on virtual functions in
Clara, but it has dropped the allocations for empty binary down
to 151.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code is now even worse mess than before, due to the ad-hoc
implementation of Result-ish type based on virtual functions in
Clara, but it has dropped the allocations for empty binary down
to 151.
</pre>
</div>
</content>
</entry>
<entry>
<title>Args and TokenStream use StringRefs instead of std::strings</title>
<updated>2023-12-27T15:24:33+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-12-27T15:19:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=5d637d4c6b72dc21e2e198894ba0527729fba535'/>
<id>5d637d4c6b72dc21e2e198894ba0527729fba535</id>
<content type='text'>
Because TokenStream is copied around a lot, moving it to use
`StringRef` removes _a lot_ of allocations per `Opt` in the parser.
Args are not copied around much, but changing them as well makes it
obvious that they do not participate in the ownership.

The changes add up to removing ~180 allocations for "empty"
invocation of the test binary.
(`./tests/ExtraTests/NoTests --allow-running-no-tests -o /dev/null`
is down to 317 allocs)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because TokenStream is copied around a lot, moving it to use
`StringRef` removes _a lot_ of allocations per `Opt` in the parser.
Args are not copied around much, but changing them as well makes it
obvious that they do not participate in the ownership.

The changes add up to removing ~180 allocations for "empty"
invocation of the test binary.
(`./tests/ExtraTests/NoTests --allow-running-no-tests -o /dev/null`
is down to 317 allocs)
</pre>
</div>
</content>
</entry>
<entry>
<title>Use StringRef for Opt's optNames</title>
<updated>2023-12-26T15:03:22+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-12-26T13:01:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=cd3c7ebe873c3da91ce57c6b2221ba95ee7f93e6'/>
<id>cd3c7ebe873c3da91ce57c6b2221ba95ee7f93e6</id>
<content type='text'>
Removes another ~70 allocations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removes another ~70 allocations.
</pre>
</div>
</content>
</entry>
<entry>
<title>Cleanup help string construction in Clara</title>
<updated>2023-12-26T13:57:29+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-12-23T15:06:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=822c44a20395c6194d527110d59f7513a55b885c'/>
<id>822c44a20395c6194d527110d59f7513a55b885c</id>
<content type='text'>
* Clara::Opt::getHelpColumns returns single item

  It could never return multiple items, but for some reason it
  was wrapping that single item in a vector.

* Use ReusableStringStream in Clara
* Reserve HelpColumns ahead of time
* Use StringRef for descriptions in HelpColumn type

The combination of these changes ends up removing about 7% (~200)
of allocations when Catch2 has to prepare output for `-h`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Clara::Opt::getHelpColumns returns single item

  It could never return multiple items, but for some reason it
  was wrapping that single item in a vector.

* Use ReusableStringStream in Clara
* Reserve HelpColumns ahead of time
* Use StringRef for descriptions in HelpColumn type

The combination of these changes ends up removing about 7% (~200)
of allocations when Catch2 has to prepare output for `-h`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Store Opt/Arg hint and description as StringRef</title>
<updated>2023-12-26T13:40:45+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-12-23T15:02:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=2295d2c8ccc0dba4b35adb95ef8946a05996df87'/>
<id>2295d2c8ccc0dba4b35adb95ef8946a05996df87</id>
<content type='text'>
There is no good reason for these to be std::strings, as these
are just (optional) constants for nice user output. This ends up
reducing the allocations significantly.

When measuring allocations when running no tests, the changes are
`tests/SelfTest` 9213 -&gt; 7705
`tests/ExtraTests/NoTests` 3723 -&gt; 2215
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no good reason for these to be std::strings, as these
are just (optional) constants for nice user output. This ends up
reducing the allocations significantly.

When measuring allocations when running no tests, the changes are
`tests/SelfTest` 9213 -&gt; 7705
`tests/ExtraTests/NoTests` 3723 -&gt; 2215
</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>Tiny cleanup in catch_clara.cpp</title>
<updated>2022-04-24T11:31:25+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-04-24T10:33:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=880285b433e90fc8d757cb65217016914b139196'/>
<id>880285b433e90fc8d757cb65217016914b139196</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Some IWYU include cleanups</title>
<updated>2022-04-14T15:16:01+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2022-04-14T15:16:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=c742ea9ad97a34c8f652dd7f67012d5b3f818c2d'/>
<id>c742ea9ad97a34c8f652dd7f67012d5b3f818c2d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Demote some single character strings into plain chars</title>
<updated>2021-10-03T08:37:30+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2021-10-03T08:09:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=928e198ef289c2c259ad0d6ee2b3741c3a2b185a'/>
<id>928e198ef289c2c259ad0d6ee2b3741c3a2b185a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
