<feed xmlns='http://www.w3.org/2005/Atom'>
<title>catch3/src/catch2/internal/catch_jsonwriter.cpp, branch v3.15.1</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>Improve performance of writing JSON values</title>
<updated>2025-08-22T15:00:40+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2025-08-21T21:36:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=fb2e4fbe413824a5cad4101c0e94cb10b7828f0d'/>
<id>fb2e4fbe413824a5cad4101c0e94cb10b7828f0d</id>
<content type='text'>
The old code was exceedingly simple, as it went char-by-char and
decided whether to write it to the output stream as-is, or escaped.
This caused a _lot_ of stream writes of individual characters.

The new code instead looks for characters that need escaping, and
bulk-writes the non-escaped characters in between them. This leads
to about the same performance for strings that comprise of only
escaped characters, and 3-10x improvement for strings without any
escaping needed.

In practice, we should expect the former rather than the latter,
but this is still nice improvement.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The old code was exceedingly simple, as it went char-by-char and
decided whether to write it to the output stream as-is, or escaped.
This caused a _lot_ of stream writes of individual characters.

The new code instead looks for characters that need escaping, and
bulk-writes the non-escaped characters in between them. This leads
to about the same performance for strings that comprise of only
escaped characters, and 3-10x improvement for strings without any
escaping needed.

In practice, we should expect the former rather than the latter,
but this is still nice improvement.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix various useful clang-tidy warnings</title>
<updated>2024-03-01T20:24:45+00:00</updated>
<author>
<name>Martin Jeřábek</name>
</author>
<published>2024-03-01T10:15:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=cde35096641d55b4aa0f743bb03e04703fbb5e9c'/>
<id>cde35096641d55b4aa0f743bb03e04703fbb5e9c</id>
<content type='text'>
* bugprone-branch-clone
* bugprone-copy-constructor-init
* bugprone-empty-catch
* bugprone-sizeof-expression
* bugprone-switch-missing-default-case
* bugprone-unused-local-non-trivial-variable
* clang-analyzer-core.uninitialized.Assign
* clang-analyzer-cplusplus.Move
* clang-analyzer-optin.cplusplus.VirtualCall
* modernize-loop-convert
* modernize-raw-string-literal
* modernize-use-equals-default
* modernize-use-override
* modernize-use-using
* performance-avoid-endl
* performance-inefficient-string-concatenation
* performance-inefficient-vector-operation
* performance-noexcept-move-constructor
* performance-unnecessary-value-param (and improve generator example)
* readability-duplicate-include
* readability-inconsistent-declaration-parameter-name
* readability-non-const-parameter
* readability-redundant-casting
* readability-redundant-member-init
* readability-redundant-smartptr-get
* readability-static-accessed-through-instance
* unused variable in amalgamted tests
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* bugprone-branch-clone
* bugprone-copy-constructor-init
* bugprone-empty-catch
* bugprone-sizeof-expression
* bugprone-switch-missing-default-case
* bugprone-unused-local-non-trivial-variable
* clang-analyzer-core.uninitialized.Assign
* clang-analyzer-cplusplus.Move
* clang-analyzer-optin.cplusplus.VirtualCall
* modernize-loop-convert
* modernize-raw-string-literal
* modernize-use-equals-default
* modernize-use-override
* modernize-use-using
* performance-avoid-endl
* performance-inefficient-string-concatenation
* performance-inefficient-vector-operation
* performance-noexcept-move-constructor
* performance-unnecessary-value-param (and improve generator example)
* readability-duplicate-include
* readability-inconsistent-declaration-parameter-name
* readability-non-const-parameter
* readability-redundant-casting
* readability-redundant-member-init
* readability-redundant-smartptr-get
* readability-static-accessed-through-instance
* unused variable in amalgamted tests
</pre>
</div>
</content>
</entry>
<entry>
<title>JSONWriter deals in StringRefs instead of std::strings</title>
<updated>2023-11-17T08:54:03+00:00</updated>
<author>
<name>Martin Hořeňovský</name>
</author>
<published>2023-11-16T21:17:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=32d9ae24bc4a0fed9a136a73e116b4ded0ac84b7'/>
<id>32d9ae24bc4a0fed9a136a73e116b4ded0ac84b7</id>
<content type='text'>
Together with liberal use of `_sr` UDL to compile-time convert
string literals into StringRefs, this will reduce the number of
allocation and remove most of the strcpy calls inherent in
converting string lits into `std::string`s.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Together with liberal use of `_sr` UDL to compile-time convert
string literals into StringRefs, this will reduce the number of
allocation and remove most of the strcpy calls inherent in
converting string lits into `std::string`s.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add JSON reporter (#2706)</title>
<updated>2023-11-14T21:52:15+00:00</updated>
<author>
<name>Beartama</name>
</author>
<published>2023-11-14T21:52:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.progmasoft.com/catch3/commit/?id=7bf136b501fef3e189b45091e8a4757a5eaef31f'/>
<id>7bf136b501fef3e189b45091e8a4757a5eaef31f</id>
<content type='text'>

Co-authored-by: Martin Hořeňovský &lt;martin.horenovsky@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Co-authored-by: Martin Hořeňovský &lt;martin.horenovsky@gmail.com&gt;</pre>
</div>
</content>
</entry>
</feed>
