Skip to content

Various misc text and unicode helpers#2565

Merged
jviotti merged 2 commits into
mainfrom
helpers-unicode
Jul 1, 2026
Merged

Various misc text and unicode helpers#2565
jviotti merged 2 commits into
mainfrom
helpers-unicode

Conversation

@jviotti

@jviotti jviotti commented Jul 1, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Review in cubic

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode

augmentcode Bot commented Jul 1, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Adds small Unicode and text convenience helpers.

Changes:

  • Introduced `utf32_to_utf8` and `utf32_to_utf8_lenient` APIs for encoding UTF-32 codepoint sequences to UTF-8.
  • Refactored `codepoint_to_utf8(..., std::string&)` to reuse a shared internal UTF-8 appender.
  • Added a `split(input, delimiter)` overload that returns `std::vector` while preserving empty parts.
  • Added unit tests for UTF-32→UTF-8 encoding (including lenient surrogate/WTF-8 cases) and for the new vector-returning `split` overload.
  • Registered the new unicode test source in the unicode test CMake target.

Technical Notes: The strict UTF-32→UTF-8 path relies on scalar-value assertions; the lenient path intentionally emits WTF-8 for surrogate codepoints.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

output.push_back(static_cast<char>(0x80 | ((codepoint >> 6) & 0x3F)));
output.push_back(static_cast<char>(0x80 | (codepoint & 0x3F)));
} else {
output.push_back(static_cast<char>(0xF0 | (codepoint >> 18)));

@augmentcode augmentcode Bot Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/core/unicode/unicode.cc:73: append_utf8 will also encode codepoints > 0x10FFFF into a 4-byte sequence, producing byte strings that utf8_to_utf32 will always reject; utf32_to_utf8 currently only prevents this in debug via assert. Consider documenting/guarding what happens for out-of-range codepoints (beyond surrogates) so release builds don’t silently emit invalid UTF-8.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

/// Unicode scalar value, the lenient counterpart of `utf32_to_utf8`. Surrogate
/// codepoints, which cannot appear in well-formed UTF-8, are encoded as their
/// (ill-formed) three-byte WTF-8 sequence rather than being rejected. This is
/// intended for round-tripping data that may carry lone surrogates, such as

@augmentcode augmentcode Bot Jul 1, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/core/unicode/include/sourcemeta/core/unicode.h:129: The doc says utf32_to_utf8_lenient is intended for “round-tripping” lone surrogates, but the only UTF-8→UTF-32 decoder here (utf8_to_utf32) explicitly rejects non-scalar values (including surrogates). Consider clarifying that this helper is for emitting WTF-8 for external/byte-preserving workflows unless a corresponding lenient decoder exists.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 6 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/core/unicode/include/sourcemeta/core/unicode.h Outdated
Comment thread src/core/unicode/unicode.cc

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (macos/llvm)

Details
Benchmark suite Current: b2ce9c0 Previous: 0177bf3 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.7662231383844 ns/iter 2.246207051583052 ns/iter 1.23
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.894750559949389 ns/iter 2.104057439953588 ns/iter 0.90
Regex_Period_Asterisk 2.5252301691473904 ns/iter 2.1814585952842283 ns/iter 1.16
Regex_Group_Period_Asterisk_Group 2.264061316764791 ns/iter 2.288949420331663 ns/iter 0.99
Regex_Period_Plus 2.891777954182429 ns/iter 2.5290089596778706 ns/iter 1.14
Regex_Period 2.856530152341902 ns/iter 2.3271225781013456 ns/iter 1.23
Regex_Caret_Period_Plus_Dollar 2.9063752921889634 ns/iter 2.4621852850410213 ns/iter 1.18
Regex_Caret_Group_Period_Plus_Group_Dollar 2.5091743681269527 ns/iter 2.3749961139518727 ns/iter 1.06
Regex_Caret_Period_Asterisk_Dollar 2.4925896999776165 ns/iter 2.05026219440856 ns/iter 1.22
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.2365305559987205 ns/iter 2.0633631480386314 ns/iter 1.08
Regex_Caret_X_Hyphen 7.78066977669922 ns/iter 7.510456087243771 ns/iter 1.04
Regex_Period_Md_Dollar 25.50223015483312 ns/iter 21.158594746824974 ns/iter 1.21
Regex_Caret_Slash_Period_Asterisk 6.298521883369668 ns/iter 5.807714979239863 ns/iter 1.08
Regex_Caret_Period_Range_Dollar 3.049776985684553 ns/iter 2.4617664953246057 ns/iter 1.24
Regex_Nested_Backtrack 37.49508317219022 ns/iter 31.148809977539376 ns/iter 1.20
JSON_Array_Of_Objects_Unique 485.3743406237187 ns/iter 490.7376602282418 ns/iter 0.99
JSON_Parse_1 5711.919892542512 ns/iter 4802.417037781916 ns/iter 1.19
JSON_Parse_Real 7205.290780329242 ns/iter 7168.971184214196 ns/iter 1.01
JSON_Parse_Decimal 8076.76675683371 ns/iter 7484.175692226112 ns/iter 1.08
JSON_Parse_Schema_ISO_Language 4565538.461538653 ns/iter 3574383.435582526 ns/iter 1.28
JSON_Parse_Integer 4241.61054230248 ns/iter 3829.7988743855394 ns/iter 1.11
JSON_Parse_String_NonSSO_Plain 5040.435420000904 ns/iter 4695.846484260911 ns/iter 1.07
JSON_Parse_String_SSO_Plain 2409.8055503690334 ns/iter 2082.413512608521 ns/iter 1.16
JSON_Parse_String_Escape_Heavy 23292.050168475558 ns/iter 17232.709317747747 ns/iter 1.35
JSON_Parse_Object_Short_Keys 7448.460262703456 ns/iter 5821.353784627217 ns/iter 1.28
JSON_Parse_Object_Scalar_Properties 3777.008916988863 ns/iter 3472.6116682642974 ns/iter 1.09
JSON_Parse_Object_Array_Properties 4354.08908687307 ns/iter 4626.869926203996 ns/iter 0.94
JSON_Parse_Object_Object_Properties 5415.074683260457 ns/iter 4968.38822216033 ns/iter 1.09
JSON_Parse_Nested_Containers 42920.492040523255 ns/iter 38729.78754539551 ns/iter 1.11
JSON_From_String_Copy 38.0205823885495 ns/iter 31.54180333222515 ns/iter 1.21
JSON_From_String_Temporary 28.729597704941668 ns/iter 26.541347474220245 ns/iter 1.08
JSON_Number_To_Double 48.61238679154712 ns/iter 45.35555915842289 ns/iter 1.07
JSON_Object_At_Last_Key/8 4.2472327670827 ns/iter 6.770387500000652 ns/iter 0.63
JSON_Object_At_Last_Key/32 14.572005690620294 ns/iter 15.063575331658225 ns/iter 0.97
JSON_Object_At_Last_Key/128 70.45993866975365 ns/iter 66.85049613447634 ns/iter 1.05
JSON_Object_At_Last_Key/512 255.46452243718832 ns/iter 241.82735586474038 ns/iter 1.06
JSON_Fast_Hash_Helm_Chart_Lock 76.21499388165225 ns/iter 83.71903116884923 ns/iter 0.91
JSON_Equality_Helm_Chart_Lock 182.20802356916002 ns/iter 174.21969312198638 ns/iter 1.05
JSON_Divisible_By_Decimal 271.1031407543101 ns/iter 229.5824431977604 ns/iter 1.18
JSON_String_Equal/10 10.190889723678852 ns/iter 8.887571805679922 ns/iter 1.15
JSON_String_Equal/100 11.405507416191284 ns/iter 8.345871038968117 ns/iter 1.37
JSON_String_Equal_Small_By_Perfect_Hash/10 1.1230698290336703 ns/iter 0.9438952265323148 ns/iter 1.19
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 5.632750226593497 ns/iter 4.244458895798343 ns/iter 1.33
JSON_String_Fast_Hash/10 3.222693295080622 ns/iter 2.955447276895875 ns/iter 1.09
JSON_String_Fast_Hash/100 2.5698694028742626 ns/iter 2.340057491241798 ns/iter 1.10
JSON_String_Key_Hash/10 2.310983634575706 ns/iter 1.6308896746234032 ns/iter 1.42
JSON_String_Key_Hash/100 3.198740377107609 ns/iter 2.882348221869795 ns/iter 1.11
JSON_Object_Defines_Miss_Same_Length 3.3402458817670317 ns/iter 3.1425482068779824 ns/iter 1.06
JSON_Object_Defines_Miss_Too_Small 3.2078204560677923 ns/iter 2.8587640947028463 ns/iter 1.12
JSON_Object_Defines_Miss_Too_Large 3.3869366361130213 ns/iter 3.2039216153175527 ns/iter 1.06
Pointer_Object_Traverse 19.084781192599994 ns/iter 20.869374642811728 ns/iter 0.91
Pointer_Object_Try_Traverse 35.40963034886529 ns/iter 30.19114340356475 ns/iter 1.17
Pointer_Push_Back_Pointer_To_Weak_Pointer 262.72298581612415 ns/iter 189.8932659326234 ns/iter 1.38
Pointer_Walker_Schema_ISO_Language 4091524.368421137 ns/iter 3939883.5051020817 ns/iter 1.04
Pointer_Maybe_Tracked_Deeply_Nested/0 1413777.9569893845 ns/iter 1211632.4042970028 ns/iter 1.17
Pointer_Maybe_Tracked_Deeply_Nested/1 2294752.9828079394 ns/iter 1837061.8450363853 ns/iter 1.25
Pointer_Position_Tracker_Get_Deeply_Nested 520.4746128819174 ns/iter 425.30251656573637 ns/iter 1.22
URITemplateRouter_Create 29591.51306825772 ns/iter 24052.336304950015 ns/iter 1.23
URITemplateRouter_Match 208.53955911691472 ns/iter 168.93046257874866 ns/iter 1.23
URITemplateRouter_Match_BasePath 221.90555848752578 ns/iter 203.37295021548883 ns/iter 1.09
URITemplateRouterView_Restore 11540.027515431293 ns/iter 9853.673894516684 ns/iter 1.17
URITemplateRouterView_Match 158.0816385781392 ns/iter 133.8054972929729 ns/iter 1.18
URITemplateRouterView_Match_BasePath 219.1711924881857 ns/iter 156.83785926993417 ns/iter 1.40
URITemplateRouterView_Arguments 672.8259952361483 ns/iter 449.3001343133166 ns/iter 1.50
JSONL_Parse_Large 20334838.085714832 ns/iter 15893441.176469387 ns/iter 1.28
JSONL_Parse_Large_GZIP 20073027.34375216 ns/iter 18826725.34693762 ns/iter 1.07
HTML_Build_Table_100000 96152098.87499532 ns/iter 88886041.66666406 ns/iter 1.08
HTML_Render_Table_100000 6417362.246269029 ns/iter 5217486.500000674 ns/iter 1.23
GZIP_Compress_ISO_Language_Set_3_Locations 41096466.124997735 ns/iter 34917271.94736876 ns/iter 1.18
GZIP_Decompress_ISO_Language_Set_3_Locations 8304559.40594094 ns/iter 7537002.012049267 ns/iter 1.10
GZIP_Compress_ISO_Language_Set_3_Schema 2028477.0540541785 ns/iter 1954246.5732648268 ns/iter 1.04
GZIP_Decompress_ISO_Language_Set_3_Schema 376566.4021852 ns/iter 324099.7569597911 ns/iter 1.16
JOSE_VerifySignature_RS256 32061.62306678387 ns/iter 30806.697759692895 ns/iter 1.04
JOSE_VerifySignature_ES512 1304916.500000088 ns/iter 1247176.9870609997 ns/iter 1.05

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (linux/gcc)

Details
Benchmark suite Current: b2ce9c0 Previous: 0177bf3 Ratio
JOSE_VerifySignature_RS256 22101.101391210534 ns/iter 24525.734742032175 ns/iter 0.90
JOSE_VerifySignature_ES512 575772.786600496 ns/iter 643215.8825687903 ns/iter 0.90
GZIP_Compress_ISO_Language_Set_3_Locations 36692926.42105479 ns/iter 39464654.666665584 ns/iter 0.93
GZIP_Decompress_ISO_Language_Set_3_Locations 4205793.9358973075 ns/iter 4079861.9005845576 ns/iter 1.03
GZIP_Compress_ISO_Language_Set_3_Schema 2044731.774853852 ns/iter 2294626.1508195675 ns/iter 0.89
GZIP_Decompress_ISO_Language_Set_3_Schema 381314.6089324913 ns/iter 275965.12865035044 ns/iter 1.38
HTML_Build_Table_100000 60539310.272722766 ns/iter 72134564.29999496 ns/iter 0.84
HTML_Render_Table_100000 1931769.4834252587 ns/iter 2199013.3281251546 ns/iter 0.88
JSONL_Parse_Large 12760255.18181789 ns/iter 12286047.947369345 ns/iter 1.04
JSONL_Parse_Large_GZIP 14110799.180000413 ns/iter 13765090.235293142 ns/iter 1.03
URITemplateRouter_Create 31040.126969373883 ns/iter 29630.514762947427 ns/iter 1.05
URITemplateRouter_Match 157.92357377751972 ns/iter 159.35060920345467 ns/iter 0.99
URITemplateRouter_Match_BasePath 185.3481683710969 ns/iter 178.048853081158 ns/iter 1.04
URITemplateRouterView_Restore 7587.1369491455835 ns/iter 8781.250003099369 ns/iter 0.86
URITemplateRouterView_Match 124.86207202718043 ns/iter 124.42307340102582 ns/iter 1.00
URITemplateRouterView_Match_BasePath 146.33837361285873 ns/iter 142.5035415164474 ns/iter 1.03
URITemplateRouterView_Arguments 476.06811140902533 ns/iter 459.8442967734889 ns/iter 1.04
Pointer_Object_Traverse 30.2846842954349 ns/iter 29.47020431548922 ns/iter 1.03
Pointer_Object_Try_Traverse 23.016823106330616 ns/iter 22.862500236506722 ns/iter 1.01
Pointer_Push_Back_Pointer_To_Weak_Pointer 147.7590429382857 ns/iter 165.00576099010593 ns/iter 0.90
Pointer_Walker_Schema_ISO_Language 1908303.540983649 ns/iter 1860821.9327958405 ns/iter 1.03
Pointer_Maybe_Tracked_Deeply_Nested/0 1544163.5132159144 ns/iter 1527229.2932165987 ns/iter 1.01
Pointer_Maybe_Tracked_Deeply_Nested/1 1687656.8602410988 ns/iter 1666660.069212562 ns/iter 1.01
Pointer_Position_Tracker_Get_Deeply_Nested 586.5036852644057 ns/iter 685.5446195404894 ns/iter 0.86
JSON_Array_Of_Objects_Unique 383.9879399745767 ns/iter 377.18567191640244 ns/iter 1.02
JSON_Parse_1 7631.412268265919 ns/iter 7419.886348302669 ns/iter 1.03
JSON_Parse_Real 6691.136848352143 ns/iter 6566.218901703567 ns/iter 1.02
JSON_Parse_Decimal 11146.87601814269 ns/iter 9574.87031483273 ns/iter 1.16
JSON_Parse_Schema_ISO_Language 5185056.266666968 ns/iter 5099625.905796509 ns/iter 1.02
JSON_Parse_Integer 4726.521053129198 ns/iter 4887.469533349071 ns/iter 0.97
JSON_Parse_String_NonSSO_Plain 8563.946931824072 ns/iter 8669.353970407736 ns/iter 0.99
JSON_Parse_String_SSO_Plain 3855.6960555314336 ns/iter 3666.682353186995 ns/iter 1.05
JSON_Parse_String_Escape_Heavy 21047.303085026455 ns/iter 18914.37336167163 ns/iter 1.11
JSON_Parse_Object_Short_Keys 11483.194694481706 ns/iter 11634.059707661705 ns/iter 0.99
JSON_Parse_Object_Scalar_Properties 5929.495011577897 ns/iter 5816.60412489013 ns/iter 1.02
JSON_Parse_Object_Array_Properties 8738.954601487636 ns/iter 9715.761935860097 ns/iter 0.90
JSON_Parse_Object_Object_Properties 9327.841923714697 ns/iter 9647.631826004063 ns/iter 0.97
JSON_Parse_Nested_Containers 71978.15121597072 ns/iter 75485.39688379588 ns/iter 0.95
JSON_From_String_Copy 18.24206840986472 ns/iter 20.057705342292746 ns/iter 0.91
JSON_From_String_Temporary 15.193573431086696 ns/iter 16.62537848482063 ns/iter 0.91
JSON_Number_To_Double 20.578488160628687 ns/iter 20.770246889022648 ns/iter 0.99
JSON_Object_At_Last_Key/8 8.11198162248467 ns/iter 6.681647437695097 ns/iter 1.21
JSON_Object_At_Last_Key/32 31.50384209396537 ns/iter 23.919492641048357 ns/iter 1.32
JSON_Object_At_Last_Key/128 126.90326588637055 ns/iter 91.44408340205582 ns/iter 1.39
JSON_Object_At_Last_Key/512 516.9501922291063 ns/iter 378.4908229401221 ns/iter 1.37
JSON_Fast_Hash_Helm_Chart_Lock 53.84396559985495 ns/iter 51.336428435545926 ns/iter 1.05
JSON_Equality_Helm_Chart_Lock 152.02781188963303 ns/iter 165.56772193218322 ns/iter 0.92
JSON_Divisible_By_Decimal 239.40197911952973 ns/iter 235.66994991910616 ns/iter 1.02
JSON_String_Equal/10 5.691226191120259 ns/iter 6.237726339649617 ns/iter 0.91
JSON_String_Equal/100 6.354676562560815 ns/iter 8.054825037237375 ns/iter 0.79
JSON_String_Equal_Small_By_Perfect_Hash/10 0.6237296620620906 ns/iter 0.711840321703094 ns/iter 0.88
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 25.20706795965206 ns/iter 22.02990778289699 ns/iter 1.14
JSON_String_Fast_Hash/10 1.2458122061179393 ns/iter 1.0553694296165896 ns/iter 1.18
JSON_String_Fast_Hash/100 1.2456186640219156 ns/iter 1.0550938908014083 ns/iter 1.18
JSON_String_Key_Hash/10 1.247412040157446 ns/iter 1.7598787277167716 ns/iter 0.71
JSON_String_Key_Hash/100 12.449006908015962 ns/iter 14.75367295716403 ns/iter 0.84
JSON_Object_Defines_Miss_Same_Length 3.1285292661733948 ns/iter 3.868080684386318 ns/iter 0.81
JSON_Object_Defines_Miss_Too_Small 3.129104769881384 ns/iter 3.966886599601391 ns/iter 0.79
JSON_Object_Defines_Miss_Too_Large 3.428997526914488 ns/iter 3.5166730321958375 ns/iter 0.98
Regex_Lower_S_Or_Upper_S_Asterisk 0.6232375600803526 ns/iter 0.7073424405749181 ns/iter 0.88
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.9353369336683991 ns/iter 0.703574325611994 ns/iter 1.33
Regex_Period_Asterisk 0.9346653597000681 ns/iter 1.0558542107304016 ns/iter 0.89
Regex_Group_Period_Asterisk_Group 0.6229021444329491 ns/iter 1.0545616336065082 ns/iter 0.59
Regex_Period_Plus 0.6254490698725139 ns/iter 0.7035574307315527 ns/iter 0.89
Regex_Period 0.9351167341569678 ns/iter 0.703388768388923 ns/iter 1.33
Regex_Caret_Period_Plus_Dollar 0.935066047701203 ns/iter 1.0550474278628224 ns/iter 0.89
Regex_Caret_Group_Period_Plus_Group_Dollar 0.6226173575542251 ns/iter 1.0551503905764643 ns/iter 0.59
Regex_Caret_Period_Asterisk_Dollar 0.6230993693918386 ns/iter 0.7151230038664061 ns/iter 0.87
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.9345551531090399 ns/iter 0.7035931052009748 ns/iter 1.33
Regex_Caret_X_Hyphen 4.076657881411005 ns/iter 3.516182220955804 ns/iter 1.16
Regex_Period_Md_Dollar 28.232053277397142 ns/iter 32.701509936359464 ns/iter 0.86
Regex_Caret_Slash_Period_Asterisk 4.382814255182917 ns/iter 4.583016085889609 ns/iter 0.96
Regex_Caret_Period_Range_Dollar 1.2466141920313871 ns/iter 0.8418430339531157 ns/iter 1.48
Regex_Nested_Backtrack 36.47886152462019 ns/iter 38.11637186473837 ns/iter 0.96

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (linux/llvm)

Details
Benchmark suite Current: b2ce9c0 Previous: 0177bf3 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.8022200831458717 ns/iter 2.8082865225914153 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.8058991027148097 ns/iter 2.800570044949564 ns/iter 1.00
Regex_Period_Asterisk 2.491447780679089 ns/iter 2.4892507608156653 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.490566790389987 ns/iter 2.4908971944897145 ns/iter 1.00
Regex_Period_Plus 3.4227100612218417 ns/iter 3.423561298046238 ns/iter 1.00
Regex_Period 3.4240643201847547 ns/iter 3.4245780596319815 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 3.1137821962301797 ns/iter 3.1143716008886053 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 3.1142130579451766 ns/iter 3.122729131112531 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 4.045284449479796 ns/iter 4.049147226128723 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 4.069995704795928 ns/iter 4.048897993193967 ns/iter 1.01
Regex_Caret_X_Hyphen 6.2657800408151925 ns/iter 7.169612725362105 ns/iter 0.87
Regex_Period_Md_Dollar 28.35157977334425 ns/iter 28.336337077181373 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 6.856300679361519 ns/iter 6.850108666002784 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 3.1273883762015333 ns/iter 4.359315168028187 ns/iter 0.72
Regex_Nested_Backtrack 37.41939783623754 ns/iter 37.5383992220542 ns/iter 1.00
JSON_Array_Of_Objects_Unique 438.21876924714513 ns/iter 436.5890224849689 ns/iter 1.00
JSON_Parse_1 4942.771543242639 ns/iter 4945.6786133626765 ns/iter 1.00
JSON_Parse_Real 5408.188029366328 ns/iter 5440.914311132375 ns/iter 0.99
JSON_Parse_Decimal 7732.719438191894 ns/iter 7771.23794689851 ns/iter 1.00
JSON_Parse_Schema_ISO_Language 3546154.243655262 ns/iter 3548592.2020204198 ns/iter 1.00
JSON_Parse_Integer 3709.2931940764734 ns/iter 3702.4103865883303 ns/iter 1.00
JSON_Parse_String_NonSSO_Plain 5090.233918939698 ns/iter 5060.049931812833 ns/iter 1.01
JSON_Parse_String_SSO_Plain 2729.4817212681482 ns/iter 2813.1940037821637 ns/iter 0.97
JSON_Parse_String_Escape_Heavy 14652.881816296553 ns/iter 14592.661625630863 ns/iter 1.00
JSON_Parse_Object_Short_Keys 8082.253723079422 ns/iter 7840.110641446326 ns/iter 1.03
JSON_Parse_Object_Scalar_Properties 4181.341912486298 ns/iter 4075.7749698387697 ns/iter 1.03
JSON_Parse_Object_Array_Properties 5826.194471027719 ns/iter 5517.529400600994 ns/iter 1.06
JSON_Parse_Object_Object_Properties 5511.023154267195 ns/iter 5694.991711066746 ns/iter 0.97
JSON_Parse_Nested_Containers 46461.20577665957 ns/iter 46208.62956567839 ns/iter 1.01
JSON_From_String_Copy 20.551272007308693 ns/iter 20.56149919488638 ns/iter 1.00
JSON_From_String_Temporary 20.75332119710959 ns/iter 18.38757358055554 ns/iter 1.13
JSON_Number_To_Double 23.874740531021047 ns/iter 22.585625963250433 ns/iter 1.06
JSON_Object_At_Last_Key/8 5.3162171176505115 ns/iter 5.293199204475494 ns/iter 1.00
JSON_Object_At_Last_Key/32 21.266993512705415 ns/iter 21.19877016031543 ns/iter 1.00
JSON_Object_At_Last_Key/128 87.61006219361144 ns/iter 87.88322656141492 ns/iter 1.00
JSON_Object_At_Last_Key/512 396.12723791926135 ns/iter 394.7257811349701 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 65.99218354018588 ns/iter 65.98869914191442 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 167.83927135007144 ns/iter 163.99444718412798 ns/iter 1.02
JSON_Divisible_By_Decimal 253.7548299869965 ns/iter 240.52816326954678 ns/iter 1.05
JSON_String_Equal/10 6.2321430910452795 ns/iter 6.250382722622462 ns/iter 1.00
JSON_String_Equal/100 6.855413141568448 ns/iter 6.860108648999106 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9361196519991802 ns/iter 0.9368284261029913 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.993615460086689 ns/iter 10.714017075437335 ns/iter 1.40
JSON_String_Fast_Hash/10 2.8025123278008657 ns/iter 2.8160779218394216 ns/iter 1.00
JSON_String_Fast_Hash/100 2.807116818298624 ns/iter 2.8018403752784367 ns/iter 1.00
JSON_String_Key_Hash/10 2.5823734111371333 ns/iter 2.4927361650767548 ns/iter 1.04
JSON_String_Key_Hash/100 9.024632025874412 ns/iter 6.538316327328206 ns/iter 1.38
JSON_Object_Defines_Miss_Same_Length 3.7365349548007347 ns/iter 3.7426572328779915 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 2.770682304881601 ns/iter 2.726854280087176 ns/iter 1.02
JSON_Object_Defines_Miss_Too_Large 2.667970924326435 ns/iter 2.6586649563428675 ns/iter 1.00
Pointer_Object_Traverse 23.98364433166903 ns/iter 23.991127165945784 ns/iter 1.00
Pointer_Object_Try_Traverse 30.294448058234096 ns/iter 30.202043925519913 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 181.2997746433163 ns/iter 159.84323299629986 ns/iter 1.13
Pointer_Walker_Schema_ISO_Language 1712146.3616503167 ns/iter 1669301.5775654484 ns/iter 1.03
Pointer_Maybe_Tracked_Deeply_Nested/0 1218121.9371728273 ns/iter 1241540.6830985881 ns/iter 0.98
Pointer_Maybe_Tracked_Deeply_Nested/1 1682625.0602407418 ns/iter 1708379.0975609035 ns/iter 0.98
Pointer_Position_Tracker_Get_Deeply_Nested 726.6333161985374 ns/iter 685.106339378395 ns/iter 1.06
URITemplateRouter_Create 31619.330397852165 ns/iter 31922.695511800266 ns/iter 0.99
URITemplateRouter_Match 174.64865178111296 ns/iter 174.20660258338884 ns/iter 1.00
URITemplateRouter_Match_BasePath 201.82023588214625 ns/iter 204.34398816984395 ns/iter 0.99
URITemplateRouterView_Restore 7787.046158551614 ns/iter 7746.501546657396 ns/iter 1.01
URITemplateRouterView_Match 146.3343362954986 ns/iter 146.19781219745298 ns/iter 1.00
URITemplateRouterView_Match_BasePath 163.67386693151258 ns/iter 164.37851218023 ns/iter 1.00
URITemplateRouterView_Arguments 437.79414042276863 ns/iter 433.1882297308802 ns/iter 1.01
JSONL_Parse_Large 9772584.472222611 ns/iter 9869387.323943287 ns/iter 0.99
JSONL_Parse_Large_GZIP 11244428.564517025 ns/iter 11504198.540983751 ns/iter 0.98
HTML_Build_Table_100000 66232812.818177745 ns/iter 66576022.2999893 ns/iter 0.99
HTML_Render_Table_100000 5201215.189394113 ns/iter 5239898.812029813 ns/iter 0.99
GZIP_Compress_ISO_Language_Set_3_Locations 32266348.363639902 ns/iter 32293193.363639973 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Locations 4041104.6242780094 ns/iter 4042770.994219793 ns/iter 1.00
GZIP_Compress_ISO_Language_Set_3_Schema 1851826.0636605148 ns/iter 1864028.3696808342 ns/iter 0.99
GZIP_Decompress_ISO_Language_Set_3_Schema 358081.49206348555 ns/iter 358184.8339294809 ns/iter 1.00
JOSE_VerifySignature_RS256 56738.07119111476 ns/iter 56846.76365111194 ns/iter 1.00
JOSE_VerifySignature_ES512 2420627.4325258094 ns/iter 2478412.692579448 ns/iter 0.98

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (windows/msvc)

Details
Benchmark suite Current: b2ce9c0 Previous: 0177bf3 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.479465357142934 ns/iter 5.099340000001575 ns/iter 0.49
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.51935035714236 ns/iter 5.018434999999499 ns/iter 0.50
Regex_Period_Asterisk 2.516818571429472 ns/iter 5.023586999998315 ns/iter 0.50
Regex_Group_Period_Asterisk_Group 2.5068467857149046 ns/iter 5.01120199999832 ns/iter 0.50
Regex_Period_Plus 2.6349892857134756 ns/iter 4.786233929640566 ns/iter 0.55
Regex_Period 2.593964729827215 ns/iter 4.768955367788046 ns/iter 0.54
Regex_Caret_Period_Plus_Dollar 2.6166415155209455 ns/iter 4.776767166243772 ns/iter 0.55
Regex_Caret_Group_Period_Plus_Group_Dollar 2.570728993240338 ns/iter 4.78162959928159 ns/iter 0.54
Regex_Caret_Period_Asterisk_Dollar 2.4819817857145865 ns/iter 5.023140000000694 ns/iter 0.49
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.5081514285716366 ns/iter 5.0171339285713294 ns/iter 0.50
Regex_Caret_X_Hyphen 5.615245000003597 ns/iter 8.15065178571471 ns/iter 0.69
Regex_Period_Md_Dollar 30.084456273627257 ns/iter 44.3144076400442 ns/iter 0.68
Regex_Caret_Slash_Period_Asterisk 4.980028999998467 ns/iter 7.865310267857036 ns/iter 0.63
Regex_Caret_Period_Range_Dollar 2.8361003087012695 ns/iter 5.983339285713945 ns/iter 0.47
Regex_Nested_Backtrack 41.42072242974319 ns/iter 54.09085999999662 ns/iter 0.77
JSON_Array_Of_Objects_Unique 406.7381202349991 ns/iter 501.8909821428354 ns/iter 0.81
JSON_Parse_1 7399.155357144797 ns/iter 8890.292900478998 ns/iter 0.83
JSON_Parse_Real 12123.80357143112 ns/iter 16008.651785714028 ns/iter 0.76
JSON_Parse_Decimal 9321.275797874861 ns/iter 11828.642187499128 ns/iter 0.79
JSON_Parse_Schema_ISO_Language 7886678.8888869155 ns/iter 8258971.999997206 ns/iter 0.95
JSON_Parse_Integer 4533.429568301644 ns/iter 6186.540178571167 ns/iter 0.73
JSON_Parse_String_NonSSO_Plain 7036.871651787837 ns/iter 7808.248883929281 ns/iter 0.90
JSON_Parse_String_SSO_Plain 2701.574399781241 ns/iter 3517.1534643018003 ns/iter 0.77
JSON_Parse_String_Escape_Heavy 22718.687500002943 ns/iter 21975.996874999735 ns/iter 1.03
JSON_Parse_Object_Short_Keys 9117.436082872535 ns/iter 13491.753571429399 ns/iter 0.68
JSON_Parse_Object_Scalar_Properties 4790.558830856041 ns/iter 6849.939732142779 ns/iter 0.70
JSON_Parse_Object_Array_Properties 8579.518395012801 ns/iter 11363.06607142907 ns/iter 0.76
JSON_Parse_Object_Object_Properties 8697.489955358556 ns/iter 11571.837500002046 ns/iter 0.75
JSON_Parse_Nested_Containers 65574.91071431189 ns/iter 82820.94866071279 ns/iter 0.79
JSON_From_String_Copy 47.377427396833376 ns/iter 63.86487499999102 ns/iter 0.74
JSON_From_String_Temporary 55.412517857129316 ns/iter 58.70030357142144 ns/iter 0.94
JSON_Number_To_Double 87.95971482319418 ns/iter 119.75896428574677 ns/iter 0.73
JSON_Object_At_Last_Key/8 6.771680803570997 ns/iter 7.243966517856495 ns/iter 0.93
JSON_Object_At_Last_Key/32 20.91809750819405 ns/iter 23.324166034325735 ns/iter 0.90
JSON_Object_At_Last_Key/128 92.61379943690837 ns/iter 89.63656742692811 ns/iter 1.03
JSON_Object_At_Last_Key/512 318.8057589284199 ns/iter 427.5486226079502 ns/iter 0.75
JSON_Fast_Hash_Helm_Chart_Lock 51.56762000001436 ns/iter 64.70285714286206 ns/iter 0.80
JSON_Equality_Helm_Chart_Lock 252.09839285724098 ns/iter 299.406546941245 ns/iter 0.84
JSON_Divisible_By_Decimal 276.3929944819081 ns/iter 300.49768967653443 ns/iter 0.92
JSON_String_Equal/10 10.692550398692969 ns/iter 15.07834375000223 ns/iter 0.71
JSON_String_Equal/100 13.253092574766796 ns/iter 16.33992042629465 ns/iter 0.81
JSON_String_Equal_Small_By_Perfect_Hash/10 1.4658191964278848 ns/iter 2.5188989285717462 ns/iter 0.58
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 9.663129687496053 ns/iter 15.061256696432071 ns/iter 0.64
JSON_String_Fast_Hash/10 2.3473962027377437 ns/iter 4.728590178570714 ns/iter 0.50
JSON_String_Fast_Hash/100 2.352362943803194 ns/iter 4.707735948007265 ns/iter 0.50
JSON_String_Key_Hash/10 2.644318122639619 ns/iter 5.337609821428455 ns/iter 0.50
JSON_String_Key_Hash/100 7.92519773247856 ns/iter 11.881104687500255 ns/iter 0.67
JSON_Object_Defines_Miss_Same_Length 4.211857820022076 ns/iter 4.0886416144434525 ns/iter 1.03
JSON_Object_Defines_Miss_Too_Small 4.776304242139032 ns/iter 5.146096999999372 ns/iter 0.93
JSON_Object_Defines_Miss_Too_Large 4.2933766721897095 ns/iter 4.4142093749997 ns/iter 0.97
Pointer_Object_Traverse 45.59191874997737 ns/iter 70.06024107143713 ns/iter 0.65
Pointer_Object_Try_Traverse 50.457200000028024 ns/iter 71.07323660715537 ns/iter 0.71
Pointer_Push_Back_Pointer_To_Weak_Pointer 182.830815814549 ns/iter 161.78584821428134 ns/iter 1.13
Pointer_Walker_Schema_ISO_Language 8176488.888890768 ns/iter 8476469.333333323 ns/iter 0.96
Pointer_Maybe_Tracked_Deeply_Nested/0 2150836.785714156 ns/iter 2462168.6746991235 ns/iter 0.87
Pointer_Maybe_Tracked_Deeply_Nested/1 3890903.4883703883 ns/iter 3763096.0893856147 ns/iter 1.03
Pointer_Position_Tracker_Get_Deeply_Nested 527.2338867188888 ns/iter 549.0498883928195 ns/iter 0.96
URITemplateRouter_Create 39193.526785728594 ns/iter 40812.91857698388 ns/iter 0.96
URITemplateRouter_Match 247.17228268153855 ns/iter 236.6777749243387 ns/iter 1.04
URITemplateRouter_Match_BasePath 282.09653268303236 ns/iter 265.3658756860312 ns/iter 1.06
URITemplateRouterView_Restore 25161.75000000333 ns/iter 32520.86438850612 ns/iter 0.77
URITemplateRouterView_Match 169.1004823058372 ns/iter 179.4468642363389 ns/iter 0.94
URITemplateRouterView_Match_BasePath 189.40469548256462 ns/iter 204.82465380251767 ns/iter 0.92
URITemplateRouterView_Arguments 446.07687499990334 ns/iter 530.0876999999673 ns/iter 0.84
JSONL_Parse_Large 26181992.30769628 ns/iter 33027471.428578705 ns/iter 0.79
JSONL_Parse_Large_GZIP 26555323.076921083 ns/iter 33522300.000002015 ns/iter 0.79
HTML_Build_Table_100000 92998755.5555777 ns/iter 90972257.1428639 ns/iter 1.02
HTML_Render_Table_100000 12288366.07142674 ns/iter 8432108.888890374 ns/iter 1.46
GZIP_Compress_ISO_Language_Set_3_Locations 33646304.76190065 ns/iter 36620484.210528195 ns/iter 0.92
GZIP_Decompress_ISO_Language_Set_3_Locations 11738308.928573003 ns/iter 10064117.333334556 ns/iter 1.17
GZIP_Compress_ISO_Language_Set_3_Schema 2013046.666667398 ns/iter 2115289.5652172132 ns/iter 0.95
GZIP_Decompress_ISO_Language_Set_3_Schema 643322.499999905 ns/iter 625553.3035714831 ns/iter 1.03
JOSE_VerifySignature_RS256 19798.97677658823 ns/iter 21213.39156172019 ns/iter 0.93
JOSE_VerifySignature_ES512 1192547.2556891178 ns/iter 1534492.1874996333 ns/iter 0.78

This comment was automatically generated by workflow using github-action-benchmark.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit 2cc994b into main Jul 1, 2026
12 checks passed
@jviotti jviotti deleted the helpers-unicode branch July 1, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant