mirror of
https://github.com/catchorg/Catch2
synced 2026-01-19 04:52:08 +00:00
As with the JSON writer, the old code was made to be simple and for each char just decided whether it needs escaping, or should be written as-is. The new code instead looks for characters that need escaping and batches writes of characters that do not. This provides 4-8x speedup (length dependent) for writing strings that do not need escaping, and keeps roughly the same performance for those that do need escaping.