[all-commits] [llvm/llvm-project] ad76a8: [libc++][format] Improves escaping. (#88283)
Mark de Wever via All-commits
all-commits at lists.llvm.org
Thu Apr 25 08:17:03 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ad76a859540d762a01b44313ef8bd18c205143b4
https://github.com/llvm/llvm-project/commit/ad76a859540d762a01b44313ef8bd18c205143b4
Author: Mark de Wever <koraq at xs4all.nl>
Date: 2024-04-25 (Thu, 25 Apr 2024)
Changed paths:
M libcxx/docs/ReleaseNotes/19.rst
M libcxx/docs/Status/Cxx23Papers.csv
M libcxx/docs/Status/Cxx2cIssues.csv
M libcxx/docs/Status/FormatIssues.csv
M libcxx/include/__format/escaped_output_table.h
M libcxx/include/__format/write_escaped.h
M libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp
M libcxx/utils/generate_escaped_output_table.py
Log Message:
-----------
[libc++][format] Improves escaping. (#88283)
The change increments the size of the lookup table considerably. The
table has an "upper boundary" check. The removal of the code units with
the property Grapheme_Extend=Yes removes the range E0100..E01EF. This
breaks the trailing large continuous section in two parts. This will be
improved in a followup patch.
Implements:
- P2713R1 Escaping improvements in std::format
- LWG3965 Incorrect example in [format.string.escaped] p3 for formatting
of combining characters
```
---------------------------------------------------------
Benchmark Before After
---------------------------------------------------------
BM_ascii_escaped<char> 95696 ns 110704 ns
BM_unicode_escaped<char> 89311 ns 101371 ns
BM_cyrillic_escaped<char> 58633 ns 63329 ns
BM_japanese_escaped<char> 44500 ns 41223 ns
BM_emoji_escaped<char> 99156 ns 111022 ns
BM_ascii_escaped<wchar_t> 92245 ns 112441 ns
BM_unicode_escaped<wchar_t> 80970 ns 102776 ns
BM_cyrillic_escaped<wchar_t> 51253 ns 58977 ns
BM_japanese_escaped<wchar_t> 37252 ns 36885 ns
BM_emoji_escaped<wchar_t> 96226 ns 115885 ns
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list