Skip to content

Implement a strictly compliant I-RegExp parsing mode#2620

Merged
jviotti merged 3 commits into
mainfrom
i-regexp
Jul 9, 2026
Merged

Implement a strictly compliant I-RegExp parsing mode#2620
jviotti merged 3 commits into
mainfrom
i-regexp

Conversation

@jviotti

@jviotti jviotti commented Jul 9, 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>
@jviotti jviotti marked this pull request as ready for review July 9, 2026 22:29
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode

augmentcode Bot commented Jul 9, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR adds a new “I-Regexp” regular-expression dialect intended to follow RFC 9485 more strictly than the existing permissive mode.

Changes:

  • Introduces RegexDialect::IRegexp in the public API and documents whole-input matching semantics.
  • Adds src/core/regex/iregexp.h, which validates patterns against the RFC 9485 grammar and translates them into a PCRE2 pattern (anchored with \A(?: … )\z and mapping . to [^\n\r]).
  • Refactors the existing permissive preprocessor into permissive.h (translate_permissive, PermissiveResult) and updates the build to include the renamed headers.
  • Updates to_regex() to compile either the RFC9485 translation or the permissive translation, and disables capture groups for the RFC9485 dialect.
  • Adds an extensive new test suite (regex_rfc9485_matches_test.cc) covering matching behavior and invalid-pattern rejection for the new dialect.

Technical Notes: The I-Regexp path is implemented as a grammar-aware translator (not a new matching engine) and relies on PCRE2 options to enforce Unicode behavior and whole-string matching.

🤖 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. 3 suggestions posted.

Fix All in Augment

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

Comment thread src/core/regex/include/sourcemeta/core/regex.h
Comment thread src/core/regex/iregexp.h
Comment thread src/core/regex/iregexp.h
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@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.

3 issues found and verified against the latest diff

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/core/regex/iregexp.h">

<violation number="1" location="src/core/regex/iregexp.h:58">
P2: `is_iregexp_category` accepts `\p{C}` (the major category) via the `name.size() == 1` early-return, but when passed through to PCRE2 this matches all of Unicode general category C — including `Cs` (surrogates). RFC 9485 deliberately omits `Cs` from the `IsCategory` subcategories to prevent surrogate matching, yet allowing the bare `C` major category re-introduces them semantically through the engine. Consider either excluding the bare `C` major category or rewriting `\p{C}` as `[\p{Cc}\p{Cf}\p{Cn}\p{Co}]` in the translated output.</violation>

<violation number="2" location="src/core/regex/iregexp.h:82">
P2: RFC 9485 patterns containing literal `^` or `$` will be compiled with PCRE2 anchor semantics instead of matching those characters. Because `iregexp_copy_character` copies normal characters straight into the engine pattern, inputs like `a^b` and `a$b` become unmatchable even though RFC 9485 treats those characters as `NormalChar` literals; escaping these metacharacters during translation would keep the new dialect strictly compliant.</violation>
</file>

<file name="src/core/regex/include/sourcemeta/core/regex.h">

<violation number="1" location="src/core/regex/include/sourcemeta/core/regex.h:77">
P2: The docstring describes this dialect as "Strict RFC 9485 I-Regexp" but the implementation intentionally deviates from the RFC for `^` and `$` (they retain PCRE2 assertion semantics rather than being treated as literals per the grammar). Consider adjusting the wording to clarify that this follows the RFC 9485 Section 5.4 engine mapping rather than a pure literal interpretation of the grammar, so callers understand the contract around these characters.</violation>
</file>

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

Re-trigger cubic

Comment thread src/core/regex/iregexp.h
}
}

output.append(pattern.substr(position, size));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: RFC 9485 patterns containing literal ^ or $ will be compiled with PCRE2 anchor semantics instead of matching those characters. Because iregexp_copy_character copies normal characters straight into the engine pattern, inputs like a^b and a$b become unmatchable even though RFC 9485 treats those characters as NormalChar literals; escaping these metacharacters during translation would keep the new dialect strictly compliant.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/core/regex/iregexp.h, line 79:

<comment>RFC 9485 patterns containing literal `^` or `$` will be compiled with PCRE2 anchor semantics instead of matching those characters. Because `iregexp_copy_character` copies normal characters straight into the engine pattern, inputs like `a^b` and `a$b` become unmatchable even though RFC 9485 treats those characters as `NormalChar` literals; escaping these metacharacters during translation would keep the new dialect strictly compliant.</comment>

<file context>
@@ -0,0 +1,384 @@
+    }
+  }
+
+  output.append(pattern.substr(position, size));
+  position += size;
+  return true;
</file context>

Comment thread src/core/regex/iregexp.h
case 'S':
return name.size() == 1 || std::string_view{"ckmo"}.contains(name[1]);
case 'C':
return name.size() == 1 || std::string_view{"cfno"}.contains(name[1]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: is_iregexp_category accepts \p{C} (the major category) via the name.size() == 1 early-return, but when passed through to PCRE2 this matches all of Unicode general category C — including Cs (surrogates). RFC 9485 deliberately omits Cs from the IsCategory subcategories to prevent surrogate matching, yet allowing the bare C major category re-introduces them semantically through the engine. Consider either excluding the bare C major category or rewriting \p{C} as [\p{Cc}\p{Cf}\p{Cn}\p{Co}] in the translated output.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/core/regex/iregexp.h, line 55:

<comment>`is_iregexp_category` accepts `\p{C}` (the major category) via the `name.size() == 1` early-return, but when passed through to PCRE2 this matches all of Unicode general category C — including `Cs` (surrogates). RFC 9485 deliberately omits `Cs` from the `IsCategory` subcategories to prevent surrogate matching, yet allowing the bare `C` major category re-introduces them semantically through the engine. Consider either excluding the bare `C` major category or rewriting `\p{C}` as `[\p{Cc}\p{Cf}\p{Cn}\p{Co}]` in the translated output.</comment>

<file context>
@@ -0,0 +1,384 @@
+    case 'S':
+      return name.size() == 1 || std::string_view{"ckmo"}.contains(name[1]);
+    case 'C':
+      return name.size() == 1 || std::string_view{"cfno"}.contains(name[1]);
+    default:
+      return false;
</file context>

/// A permissive superset of ECMA 262 with PCRE2 extensions
Permissive
Permissive,
/// Strict RFC 9485 I-Regexp, where any pattern outside the grammar is

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: The docstring describes this dialect as "Strict RFC 9485 I-Regexp" but the implementation intentionally deviates from the RFC for ^ and $ (they retain PCRE2 assertion semantics rather than being treated as literals per the grammar). Consider adjusting the wording to clarify that this follows the RFC 9485 Section 5.4 engine mapping rather than a pure literal interpretation of the grammar, so callers understand the contract around these characters.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/core/regex/include/sourcemeta/core/regex.h, line 77:

<comment>The docstring describes this dialect as "Strict RFC 9485 I-Regexp" but the implementation intentionally deviates from the RFC for `^` and `$` (they retain PCRE2 assertion semantics rather than being treated as literals per the grammar). Consider adjusting the wording to clarify that this follows the RFC 9485 Section 5.4 engine mapping rather than a pure literal interpretation of the grammar, so callers understand the contract around these characters.</comment>

<file context>
@@ -73,7 +73,10 @@ enum class RegexIndex : std::uint8_t {
   /// A permissive superset of ECMA 262 with PCRE2 extensions
-  Permissive
+  Permissive,
+  /// Strict RFC 9485 I-Regexp, where any pattern outside the grammar is
+  /// rejected and matching considers the whole input
+  IRegexp
</file context>
Suggested change
/// Strict RFC 9485 I-Regexp, where any pattern outside the grammar is
/// RFC 9485 I-Regexp (Section 5.4 engine mapping), where any pattern outside the grammar is

@jviotti jviotti merged commit 7227a9f into main Jul 9, 2026
12 checks passed
@jviotti jviotti deleted the i-regexp branch July 9, 2026 22:49

@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: 29b3316 Previous: 7cf53c9 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.1883678804692956 ns/iter 2.320395197265436 ns/iter 0.94
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.2981678081469377 ns/iter 2.6617680763627263 ns/iter 0.86
Regex_Period_Asterisk 2.2207030258188745 ns/iter 2.2242238193857378 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.0222085618967616 ns/iter 1.861062504400786 ns/iter 1.09
Regex_Period_Plus 2.342969764197538 ns/iter 2.412825275403014 ns/iter 0.97
Regex_Period 2.4676402871803287 ns/iter 2.3127983531731235 ns/iter 1.07
Regex_Caret_Period_Plus_Dollar 2.3663578121399573 ns/iter 2.5653418022951104 ns/iter 0.92
Regex_Caret_Group_Period_Plus_Group_Dollar 2.668880429684213 ns/iter 2.329670098046606 ns/iter 1.15
Regex_Caret_Period_Asterisk_Dollar 2.136555366784598 ns/iter 1.950496521889296 ns/iter 1.10
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.1230469759298245 ns/iter 1.8797590436308682 ns/iter 1.13
Regex_Caret_X_Hyphen 7.275779500937762 ns/iter 6.915270371421609 ns/iter 1.05
Regex_Period_Md_Dollar 23.846796810651504 ns/iter 23.33584757993658 ns/iter 1.02
Regex_Caret_Slash_Period_Asterisk 5.266719762131349 ns/iter 6.19775221458599 ns/iter 0.85
Regex_Caret_Period_Range_Dollar 2.7485963409856007 ns/iter 3.037417620703607 ns/iter 0.90
Regex_Nested_Backtrack 34.90196410206096 ns/iter 34.73071218937885 ns/iter 1.00
JSON_Array_Of_Objects_Unique 412.93506624215576 ns/iter 426.16114575269273 ns/iter 0.97
JSON_Parse_1 7737.560467117969 ns/iter 4813.131206941748 ns/iter 1.61
JSON_Parse_Real 6750.692288030433 ns/iter 8393.046104956336 ns/iter 0.80
JSON_Parse_Decimal 7877.955052241596 ns/iter 9053.943069219416 ns/iter 0.87
JSON_Parse_Schema_ISO_Language 4039330.801104933 ns/iter 5890097.934306254 ns/iter 0.69
JSON_Parse_Integer 5262.829999999212 ns/iter 3612.2119260157574 ns/iter 1.46
JSON_Parse_String_NonSSO_Plain 7762.5564920401785 ns/iter 6833.482055380102 ns/iter 1.14
JSON_Parse_String_SSO_Plain 2923.7185191108174 ns/iter 2031.840815450639 ns/iter 1.44
JSON_Parse_String_Escape_Heavy 24067.06806120399 ns/iter 20944.233827661796 ns/iter 1.15
JSON_Parse_Object_Short_Keys 8242.604347938834 ns/iter 8747.390199587691 ns/iter 0.94
JSON_Parse_Object_Scalar_Properties 4404.297809622886 ns/iter 3679.659276683526 ns/iter 1.20
JSON_Parse_Object_Array_Properties 7607.048427679882 ns/iter 5252.496217096609 ns/iter 1.45
JSON_Parse_Object_Object_Properties 7901.445709955691 ns/iter 4469.452758170782 ns/iter 1.77
JSON_Parse_Nested_Containers 69354.97017360195 ns/iter 37437.04487503241 ns/iter 1.85
JSON_From_String_Copy 26.26395971094637 ns/iter 29.512373715339898 ns/iter 0.89
JSON_From_String_Temporary 20.163204496154925 ns/iter 23.08121524873454 ns/iter 0.87
JSON_Number_To_Double 36.35445265605175 ns/iter 38.740761297350616 ns/iter 0.94
JSON_Object_At_Last_Key/8 5.833118734012901 ns/iter 5.310020544715616 ns/iter 1.10
JSON_Object_At_Last_Key/32 13.729508039099615 ns/iter 13.806593392288828 ns/iter 0.99
JSON_Object_At_Last_Key/128 55.87437843146762 ns/iter 67.93715267130841 ns/iter 0.82
JSON_Object_At_Last_Key/512 228.4544518354697 ns/iter 245.62662162491642 ns/iter 0.93
JSON_Fast_Hash_Helm_Chart_Lock 68.71220273147087 ns/iter 71.89017073502963 ns/iter 0.96
JSON_Equality_Helm_Chart_Lock 167.44128740309836 ns/iter 157.22871329105217 ns/iter 1.06
JSON_Divisible_By_Decimal 212.07762770137685 ns/iter 202.59445665766023 ns/iter 1.05
JSON_String_Equal/10 8.055632039072902 ns/iter 9.70156825975583 ns/iter 0.83
JSON_String_Equal/100 8.333556953423164 ns/iter 10.394614544360955 ns/iter 0.80
JSON_String_Equal_Small_By_Perfect_Hash/10 0.45158935824678964 ns/iter 1.1448184794435983 ns/iter 0.39
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.481877406483703 ns/iter 5.602618339999026 ns/iter 0.62
JSON_String_Fast_Hash/10 2.7056590289716715 ns/iter 3.2551574811803294 ns/iter 0.83
JSON_String_Fast_Hash/100 2.919047759540447 ns/iter 2.7723866812843685 ns/iter 1.05
JSON_String_Key_Hash/10 1.8825637237052948 ns/iter 1.8756965783388526 ns/iter 1.00
JSON_String_Key_Hash/100 2.470653607787283 ns/iter 3.027531651214119 ns/iter 0.82
JSON_Object_Defines_Miss_Same_Length 2.738598192214926 ns/iter 3.5251616551286533 ns/iter 0.78
JSON_Object_Defines_Miss_Too_Small 2.6990281562538923 ns/iter 4.5055486785888395 ns/iter 0.60
JSON_Object_Defines_Miss_Too_Large 2.7348267808238944 ns/iter 3.4370867527099946 ns/iter 0.80
Pointer_Object_Traverse 26.3364365094504 ns/iter 29.47970097865138 ns/iter 0.89
Pointer_Object_Try_Traverse 25.162521267950584 ns/iter 41.675254660100556 ns/iter 0.60
Pointer_Push_Back_Pointer_To_Weak_Pointer 189.97505086307305 ns/iter 250.76129778115717 ns/iter 0.76
Pointer_Walker_Schema_ISO_Language 3188251.595744813 ns/iter 7509112.268518561 ns/iter 0.42
Pointer_Maybe_Tracked_Deeply_Nested/0 1437556.2372187101 ns/iter 1461802.0151188737 ns/iter 0.98
Pointer_Maybe_Tracked_Deeply_Nested/1 1020218.7034276167 ns/iter 1928423.5668791623 ns/iter 0.53
Pointer_Position_Tracker_Get_Deeply_Nested 321.3590826344579 ns/iter 508.23510434884184 ns/iter 0.63
URITemplateRouter_Create 22771.250930356342 ns/iter 38543.03934816837 ns/iter 0.59
URITemplateRouter_Match 165.11892139375044 ns/iter 220.02869993253455 ns/iter 0.75
URITemplateRouter_Match_BasePath 197.59094567746664 ns/iter 262.0456122049003 ns/iter 0.75
URITemplateRouterView_Restore 10156.711182517442 ns/iter 17272.322874841622 ns/iter 0.59
URITemplateRouterView_Match 136.61797033098551 ns/iter 180.65580231430945 ns/iter 0.76
URITemplateRouterView_Match_BasePath 167.83468779157653 ns/iter 218.1914144579075 ns/iter 0.77
URITemplateRouterView_Arguments 622.9450556770994 ns/iter 566.5112499999623 ns/iter 1.10
JSONL_Parse_Large 13116116.379310055 ns/iter 20178541.65853528 ns/iter 0.65
JSONL_Parse_Large_GZIP 14623998.403847666 ns/iter 20672550.916666903 ns/iter 0.71
JSONLD_Catalog_Annotation_List_Populate 1178381.0044576942 ns/iter 1548946.4720194673 ns/iter 0.76
JSONLD_Catalog_Materialize 5632402.206612282 ns/iter 4894404.006328922 ns/iter 1.15
HTML_Build_Table_100000 81807695.31249866 ns/iter 88731416.7142839 ns/iter 0.92
HTML_Render_Table_100000 2601819.9541284116 ns/iter 5813257.299270022 ns/iter 0.45
GZIP_Compress_ISO_Language_Set_3_Locations 32788399.636362184 ns/iter 37473545.85000266 ns/iter 0.87
GZIP_Decompress_ISO_Language_Set_3_Locations 4951005.298342236 ns/iter 7439388.0602407 ns/iter 0.67
GZIP_Compress_ISO_Language_Set_3_Schema 2033514.5027623447 ns/iter 2724619.8386166454 ns/iter 0.75
GZIP_Decompress_ISO_Language_Set_3_Schema 595636.8980169408 ns/iter 453408.91238667606 ns/iter 1.31
JOSE_VerifySignature_RS256 39879.58301550849 ns/iter 37706.79128115527 ns/iter 1.06
JOSE_VerifySignature_ES512 1932458.0399999083 ns/iter 1376519.7423581153 ns/iter 1.40

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: 29b3316 Previous: 7cf53c9 Ratio
JOSE_VerifySignature_RS256 22158.625326823665 ns/iter 22255.432280811987 ns/iter 1.00
JOSE_VerifySignature_ES512 575833.7094649681 ns/iter 576266.8898026241 ns/iter 1.00
GZIP_Compress_ISO_Language_Set_3_Locations 36420723.894737326 ns/iter 36562975.894735485 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Locations 4193905.8915661927 ns/iter 4538786.217948835 ns/iter 0.92
GZIP_Compress_ISO_Language_Set_3_Schema 2020301.002881694 ns/iter 2033973.0637682592 ns/iter 0.99
GZIP_Decompress_ISO_Language_Set_3_Schema 379530.34777896554 ns/iter 382171.45320196945 ns/iter 0.99
HTML_Build_Table_100000 60355875.41667079 ns/iter 60965826.16666523 ns/iter 0.99
HTML_Render_Table_100000 1926360.4642855332 ns/iter 1974484.7636885853 ns/iter 0.98
JSONLD_Catalog_Annotation_List_Populate 1308445.1676191054 ns/iter 1334564.7590822184 ns/iter 0.98
JSONLD_Catalog_Materialize 6772505.028846555 ns/iter 7104852.137254458 ns/iter 0.95
JSONL_Parse_Large 13688386.470586885 ns/iter 13701094.490195775 ns/iter 1.00
JSONL_Parse_Large_GZIP 15070665.217390046 ns/iter 15011915.978721417 ns/iter 1.00
URITemplateRouter_Create 30734.955408718964 ns/iter 30080.147271162954 ns/iter 1.02
URITemplateRouter_Match 158.49130100538727 ns/iter 154.4973648753725 ns/iter 1.03
URITemplateRouter_Match_BasePath 187.9064609136348 ns/iter 180.9281025230471 ns/iter 1.04
URITemplateRouterView_Restore 8447.503468769955 ns/iter 8706.348984956843 ns/iter 0.97
URITemplateRouterView_Match 123.77522408799986 ns/iter 122.64376176767027 ns/iter 1.01
URITemplateRouterView_Match_BasePath 141.56357012065473 ns/iter 144.10768179122047 ns/iter 0.98
URITemplateRouterView_Arguments 477.7594510022703 ns/iter 468.32185746078795 ns/iter 1.02
Pointer_Object_Traverse 30.88980508408287 ns/iter 31.04484150069338 ns/iter 1.00
Pointer_Object_Try_Traverse 23.064516500467892 ns/iter 22.722663055141886 ns/iter 1.02
Pointer_Push_Back_Pointer_To_Weak_Pointer 157.30078024621199 ns/iter 148.21806540713533 ns/iter 1.06
Pointer_Walker_Schema_ISO_Language 2475829.989010983 ns/iter 2833825.3480001185 ns/iter 0.87
Pointer_Maybe_Tracked_Deeply_Nested/0 1826755.0775401816 ns/iter 1809676.4068243725 ns/iter 1.01
Pointer_Maybe_Tracked_Deeply_Nested/1 1723290.2678132246 ns/iter 1709336.7104622775 ns/iter 1.01
Pointer_Position_Tracker_Get_Deeply_Nested 415.2924585456806 ns/iter 398.51357352194356 ns/iter 1.04
JSON_Array_Of_Objects_Unique 479.15649070887446 ns/iter 407.7526098396153 ns/iter 1.18
JSON_Parse_1 9831.45076457873 ns/iter 9583.347463534843 ns/iter 1.03
JSON_Parse_Real 7724.4074221919545 ns/iter 7714.651628659123 ns/iter 1.00
JSON_Parse_Decimal 12755.080960151585 ns/iter 12600.522404331 ns/iter 1.01
JSON_Parse_Schema_ISO_Language 6590475.773585471 ns/iter 6610767.826531145 ns/iter 1.00
JSON_Parse_Integer 5762.347342204602 ns/iter 5806.187136745446 ns/iter 0.99
JSON_Parse_String_NonSSO_Plain 12601.2033129274 ns/iter 12259.901613524908 ns/iter 1.03
JSON_Parse_String_SSO_Plain 5191.9535974392265 ns/iter 5145.573298314104 ns/iter 1.01
JSON_Parse_String_Escape_Heavy 25874.382514666453 ns/iter 26106.35060907165 ns/iter 0.99
JSON_Parse_Object_Short_Keys 13747.868234787162 ns/iter 13331.14660673249 ns/iter 1.03
JSON_Parse_Object_Scalar_Properties 7087.974472526386 ns/iter 6862.169151365043 ns/iter 1.03
JSON_Parse_Object_Array_Properties 12150.488953528073 ns/iter 11198.674276259197 ns/iter 1.08
JSON_Parse_Object_Object_Properties 12423.857706386236 ns/iter 11613.991631042025 ns/iter 1.07
JSON_Parse_Nested_Containers 99475.91747434571 ns/iter 96422.52146308246 ns/iter 1.03
JSON_From_String_Copy 18.399930071130367 ns/iter 17.706345539251366 ns/iter 1.04
JSON_From_String_Temporary 15.385202107767372 ns/iter 15.113724160407902 ns/iter 1.02
JSON_Number_To_Double 21.839036706805054 ns/iter 21.25369132142769 ns/iter 1.03
JSON_Object_At_Last_Key/8 3.829097350555245 ns/iter 5.612541733914232 ns/iter 0.68
JSON_Object_At_Last_Key/32 11.883852993578104 ns/iter 23.989706959500637 ns/iter 0.50
JSON_Object_At_Last_Key/128 48.63887126116605 ns/iter 87.66917974360456 ns/iter 0.55
JSON_Object_At_Last_Key/512 357.11480317104105 ns/iter 401.9798649171129 ns/iter 0.89
JSON_Fast_Hash_Helm_Chart_Lock 79.31771345878292 ns/iter 57.51140146182982 ns/iter 1.38
JSON_Equality_Helm_Chart_Lock 163.78466542371223 ns/iter 184.6582033980886 ns/iter 0.89
JSON_Divisible_By_Decimal 241.8422044872258 ns/iter 247.7146001078317 ns/iter 0.98
JSON_String_Equal/10 6.000468304423771 ns/iter 6.036910444401369 ns/iter 0.99
JSON_String_Equal/100 6.629180862981262 ns/iter 6.661594078513457 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.623999840481754 ns/iter 0.7401601182908241 ns/iter 0.84
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 25.211081117337553 ns/iter 25.265167429833777 ns/iter 1.00
JSON_String_Fast_Hash/10 2.574626829070775 ns/iter 2.2630702464360573 ns/iter 1.14
JSON_String_Fast_Hash/100 2.5700888780235416 ns/iter 2.263497376595863 ns/iter 1.14
JSON_String_Key_Hash/10 1.2475790310804764 ns/iter 1.2463734253520098 ns/iter 1.00
JSON_String_Key_Hash/100 12.442856377441306 ns/iter 12.444044292588801 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.1310069035647765 ns/iter 3.1133762952102573 ns/iter 1.01
JSON_Object_Defines_Miss_Too_Small 3.4258068436221896 ns/iter 3.130200556594989 ns/iter 1.09
JSON_Object_Defines_Miss_Too_Large 3.188839561842051 ns/iter 3.4287758770604047 ns/iter 0.93
Regex_Lower_S_Or_Upper_S_Asterisk 0.9342927815636024 ns/iter 0.6230904303614058 ns/iter 1.50
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.623178390044686 ns/iter 0.935398627259099 ns/iter 0.67
Regex_Period_Asterisk 0.934251848792929 ns/iter 0.6227939932898124 ns/iter 1.50
Regex_Group_Period_Asterisk_Group 0.6235312454969738 ns/iter 0.9347673170549646 ns/iter 0.67
Regex_Period_Plus 0.9352900170600476 ns/iter 0.6239664725053466 ns/iter 1.50
Regex_Period 0.6233213401619763 ns/iter 0.9348780930870748 ns/iter 0.67
Regex_Caret_Period_Plus_Dollar 0.9345013860670207 ns/iter 0.6227843206292762 ns/iter 1.50
Regex_Caret_Group_Period_Plus_Group_Dollar 0.6229781783460396 ns/iter 0.9357507329365571 ns/iter 0.67
Regex_Caret_Period_Asterisk_Dollar 0.9344238350415697 ns/iter 0.6238556432117468 ns/iter 1.50
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.6254242324265359 ns/iter 0.9345913233417548 ns/iter 0.67
Regex_Caret_X_Hyphen 4.051260721324014 ns/iter 3.7439866918850506 ns/iter 1.08
Regex_Period_Md_Dollar 39.1713991585196 ns/iter 29.385636111306553 ns/iter 1.33
Regex_Caret_Slash_Period_Asterisk 4.357162792360605 ns/iter 4.04685076112045 ns/iter 1.08
Regex_Caret_Period_Range_Dollar 1.2459446590223597 ns/iter 1.5587345851863734 ns/iter 0.80
Regex_Nested_Backtrack 39.49104617282968 ns/iter 37.81489080601488 ns/iter 1.04

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: 29b3316 Previous: 7cf53c9 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.4664599528508315 ns/iter 2.1822205741729706 ns/iter 1.13
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.4639835035434223 ns/iter 2.181767528935924 ns/iter 1.13
Regex_Period_Asterisk 2.815354084722289 ns/iter 2.187506603791134 ns/iter 1.29
Regex_Group_Period_Asterisk_Group 2.8165988121906786 ns/iter 2.1961177513832943 ns/iter 1.28
Regex_Period_Plus 3.875775529301196 ns/iter 2.503066076450233 ns/iter 1.55
Regex_Period 2.4697256507819927 ns/iter 2.4906777150280313 ns/iter 0.99
Regex_Caret_Period_Plus_Dollar 2.817914187752633 ns/iter 2.8167150539344807 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 2.814252640323174 ns/iter 2.8200369583525924 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 3.876052191534316 ns/iter 3.1104503942902095 ns/iter 1.25
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.87564955477986 ns/iter 3.1116376864496935 ns/iter 1.25
Regex_Caret_X_Hyphen 7.042491797437749 ns/iter 6.852531720142932 ns/iter 1.03
Regex_Period_Md_Dollar 26.369367139692017 ns/iter 28.479559089448813 ns/iter 0.93
Regex_Caret_Slash_Period_Asterisk 7.395564028791768 ns/iter 5.926079314136929 ns/iter 1.25
Regex_Caret_Period_Range_Dollar 4.233955179595959 ns/iter 4.048306669237582 ns/iter 1.05
Regex_Nested_Backtrack 38.26412657616895 ns/iter 38.64893604202693 ns/iter 0.99
JSON_Array_Of_Objects_Unique 439.5293182329448 ns/iter 457.3118196210972 ns/iter 0.96
JSON_Parse_1 4805.201425012175 ns/iter 4788.1853274922405 ns/iter 1.00
JSON_Parse_Real 5346.186069568477 ns/iter 5366.24802602427 ns/iter 1.00
JSON_Parse_Decimal 7616.940571702236 ns/iter 7731.016341422426 ns/iter 0.99
JSON_Parse_Schema_ISO_Language 3610295.3112240774 ns/iter 3526095.9040404786 ns/iter 1.02
JSON_Parse_Integer 3873.0504128158786 ns/iter 3790.7323319790703 ns/iter 1.02
JSON_Parse_String_NonSSO_Plain 5163.102147130275 ns/iter 4882.516262088578 ns/iter 1.06
JSON_Parse_String_SSO_Plain 2871.6052977305976 ns/iter 2677.4367154853435 ns/iter 1.07
JSON_Parse_String_Escape_Heavy 15410.56203689425 ns/iter 14531.937610039826 ns/iter 1.06
JSON_Parse_Object_Short_Keys 8207.413611949301 ns/iter 10609.035253784727 ns/iter 0.77
JSON_Parse_Object_Scalar_Properties 4186.966962333617 ns/iter 4123.987421904653 ns/iter 1.02
JSON_Parse_Object_Array_Properties 5713.15757941346 ns/iter 6889.706874380864 ns/iter 0.83
JSON_Parse_Object_Object_Properties 5639.502540209945 ns/iter 6860.636213311344 ns/iter 0.82
JSON_Parse_Nested_Containers 45177.96935879035 ns/iter 48706.529784271734 ns/iter 0.93
JSON_From_String_Copy 23.22528469941221 ns/iter 19.62891519804825 ns/iter 1.18
JSON_From_String_Temporary 20.77852131942978 ns/iter 17.14452299738893 ns/iter 1.21
JSON_Number_To_Double 22.52744643721666 ns/iter 22.93735700356554 ns/iter 0.98
JSON_Object_At_Last_Key/8 4.0131793372077595 ns/iter 3.8405672955599544 ns/iter 1.04
JSON_Object_At_Last_Key/32 13.307365790373183 ns/iter 12.574489546511346 ns/iter 1.06
JSON_Object_At_Last_Key/128 56.68442783048325 ns/iter 48.579110450996744 ns/iter 1.17
JSON_Object_At_Last_Key/512 370.74439168044233 ns/iter 399.7163968618035 ns/iter 0.93
JSON_Fast_Hash_Helm_Chart_Lock 74.97350970086586 ns/iter 58.868006256122484 ns/iter 1.27
JSON_Equality_Helm_Chart_Lock 163.7429302447526 ns/iter 156.9831171125941 ns/iter 1.04
JSON_Divisible_By_Decimal 247.73001123338958 ns/iter 263.31265081524856 ns/iter 0.94
JSON_String_Equal/10 6.334288838947167 ns/iter 6.234071793073367 ns/iter 1.02
JSON_String_Equal/100 6.3369874233131425 ns/iter 6.851502808137429 ns/iter 0.92
JSON_String_Equal_Small_By_Perfect_Hash/10 1.055222862348305 ns/iter 0.9360231088011404 ns/iter 1.13
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 12.419843885943013 ns/iter 14.929242247013375 ns/iter 0.83
JSON_String_Fast_Hash/10 2.8151171974802445 ns/iter 2.18068678526828 ns/iter 1.29
JSON_String_Fast_Hash/100 2.814857976073766 ns/iter 2.177630699088106 ns/iter 1.29
JSON_String_Key_Hash/10 2.4628395806404706 ns/iter 2.5997491387754366 ns/iter 0.95
JSON_String_Key_Hash/100 7.735041563603002 ns/iter 9.023388053893497 ns/iter 0.86
JSON_Object_Defines_Miss_Same_Length 2.9551409663197346 ns/iter 2.634694470224868 ns/iter 1.12
JSON_Object_Defines_Miss_Too_Small 2.965888755517685 ns/iter 2.604456312069496 ns/iter 1.14
JSON_Object_Defines_Miss_Too_Large 4.224876791273772 ns/iter 3.422119921628908 ns/iter 1.23
Pointer_Object_Traverse 30.655899955535048 ns/iter 28.57913087519711 ns/iter 1.07
Pointer_Object_Try_Traverse 32.96003384906503 ns/iter 30.915812364760956 ns/iter 1.07
Pointer_Push_Back_Pointer_To_Weak_Pointer 169.70804067038887 ns/iter 185.52936570915614 ns/iter 0.91
Pointer_Walker_Schema_ISO_Language 3084279.3668121356 ns/iter 2709082.99245299 ns/iter 1.14
Pointer_Maybe_Tracked_Deeply_Nested/0 1265404.9257247134 ns/iter 1205492.2820069015 ns/iter 1.05
Pointer_Maybe_Tracked_Deeply_Nested/1 1634735.3107475287 ns/iter 1611402.090277794 ns/iter 1.01
Pointer_Position_Tracker_Get_Deeply_Nested 691.9566576869954 ns/iter 682.3580770739387 ns/iter 1.01
URITemplateRouter_Create 33644.514918967085 ns/iter 31753.32691874713 ns/iter 1.06
URITemplateRouter_Match 174.84324825896627 ns/iter 173.3262954972445 ns/iter 1.01
URITemplateRouter_Match_BasePath 205.02745492336174 ns/iter 198.4501196052387 ns/iter 1.03
URITemplateRouterView_Restore 9841.782007587826 ns/iter 8309.054097803148 ns/iter 1.18
URITemplateRouterView_Match 145.20060500987518 ns/iter 144.94534593468592 ns/iter 1.00
URITemplateRouterView_Match_BasePath 164.059335388209 ns/iter 164.1834799689528 ns/iter 1.00
URITemplateRouterView_Arguments 449.00418877924847 ns/iter 445.6343189197951 ns/iter 1.01
JSONL_Parse_Large 9219755.675325679 ns/iter 9650630.166667106 ns/iter 0.96
JSONL_Parse_Large_GZIP 10986069.296874845 ns/iter 11225527.112903746 ns/iter 0.98
JSONLD_Catalog_Annotation_List_Populate 1327926.5456274173 ns/iter 1261903.5753177428 ns/iter 1.05
JSONLD_Catalog_Materialize 4716422.962962531 ns/iter 4173588.9821430715 ns/iter 1.13
HTML_Build_Table_100000 76479831.69999862 ns/iter 68386190.19999896 ns/iter 1.12
HTML_Render_Table_100000 5564255.603305415 ns/iter 5347613.984615517 ns/iter 1.04
GZIP_Compress_ISO_Language_Set_3_Locations 35775067.25000034 ns/iter 33284543.571426183 ns/iter 1.07
GZIP_Decompress_ISO_Language_Set_3_Locations 4281746.036810039 ns/iter 4141499.822484946 ns/iter 1.03
GZIP_Compress_ISO_Language_Set_3_Schema 2140462.116564423 ns/iter 1891109.8915991234 ns/iter 1.13
GZIP_Decompress_ISO_Language_Set_3_Schema 274405.67934141774 ns/iter 354442.6116455794 ns/iter 0.77
JOSE_VerifySignature_RS256 64007.730586514306 ns/iter 60168.00042925822 ns/iter 1.06
JOSE_VerifySignature_ES512 2678667.1839080974 ns/iter 2421127.4083047262 ns/iter 1.11

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: 29b3316 Previous: 7cf53c9 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 5.1256739999996626 ns/iter 3.845947544642847 ns/iter 1.33
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 5.338578571428546 ns/iter 3.949655133928611 ns/iter 1.35
Regex_Period_Asterisk 5.332791999999245 ns/iter 3.933607700892873 ns/iter 1.36
Regex_Group_Period_Asterisk_Group 5.338187999999491 ns/iter 3.84158589971735 ns/iter 1.39
Regex_Period_Plus 5.018029000000297 ns/iter 3.6192168470233916 ns/iter 1.39
Regex_Period 4.82868483220641 ns/iter 3.5671706194262813 ns/iter 1.35
Regex_Caret_Period_Plus_Dollar 5.020145999999386 ns/iter 3.5799562436071084 ns/iter 1.40
Regex_Caret_Group_Period_Plus_Group_Dollar 4.780054688566839 ns/iter 3.5723425390607235 ns/iter 1.34
Regex_Caret_Period_Asterisk_Dollar 5.034847321428718 ns/iter 3.849478385983143 ns/iter 1.31
Regex_Caret_Group_Period_Asterisk_Group_Dollar 5.344565999999986 ns/iter 3.9055284891171924 ns/iter 1.37
Regex_Caret_X_Hyphen 8.154131213598301 ns/iter 6.037466071429013 ns/iter 1.35
Regex_Period_Md_Dollar 45.781594010881314 ns/iter 53.202939999994214 ns/iter 0.86
Regex_Caret_Slash_Period_Asterisk 8.15477232142798 ns/iter 5.945598214286259 ns/iter 1.37
Regex_Caret_Period_Range_Dollar 5.645058999999718 ns/iter 4.120052864500601 ns/iter 1.37
Regex_Nested_Backtrack 57.05831999999872 ns/iter 62.71037500000481 ns/iter 0.91
JSON_Array_Of_Objects_Unique 588.2249107143269 ns/iter 524.8886607142415 ns/iter 1.12
JSON_Parse_1 8892.419676698859 ns/iter 7605.787946428474 ns/iter 1.17
JSON_Parse_Real 15987.60491071565 ns/iter 13938.872594317398 ns/iter 1.15
JSON_Parse_Decimal 11801.95156250008 ns/iter 8874.612723214374 ns/iter 1.33
JSON_Parse_Schema_ISO_Language 7860192.222223204 ns/iter 6248332.142857091 ns/iter 1.26
JSON_Parse_Integer 6219.23571428543 ns/iter 4542.360000776093 ns/iter 1.37
JSON_Parse_String_NonSSO_Plain 7845.722098214531 ns/iter 6134.2553571423405 ns/iter 1.28
JSON_Parse_String_SSO_Plain 3657.8515578876018 ns/iter 2881.173535190209 ns/iter 1.27
JSON_Parse_String_Escape_Heavy 21597.368115606718 ns/iter 16796.696428573097 ns/iter 1.29
JSON_Parse_Object_Short_Keys 13410.589015227835 ns/iter 10047.0156250001 ns/iter 1.33
JSON_Parse_Object_Scalar_Properties 7029.230357142678 ns/iter 5178.97678571444 ns/iter 1.36
JSON_Parse_Object_Array_Properties 11356.510937501342 ns/iter 8984.17745535721 ns/iter 1.26
JSON_Parse_Object_Object_Properties 11544.710937499758 ns/iter 9093.827008928658 ns/iter 1.27
JSON_Parse_Nested_Containers 79979.22991071097 ns/iter 64876.037946426375 ns/iter 1.23
JSON_From_String_Copy 63.87995535713945 ns/iter 49.378710000007686 ns/iter 1.29
JSON_From_String_Temporary 57.8761600000007 ns/iter 68.05561383928753 ns/iter 0.85
JSON_Number_To_Double 120.09058928571545 ns/iter 104.56406249998551 ns/iter 1.15
JSON_Object_At_Last_Key/8 7.629960714285947 ns/iter 5.796572321428479 ns/iter 1.32
JSON_Object_At_Last_Key/32 23.76226647586714 ns/iter 19.60538856790434 ns/iter 1.21
JSON_Object_At_Last_Key/128 89.55556743055685 ns/iter 72.23455357142987 ns/iter 1.24
JSON_Object_At_Last_Key/512 425.2839375000405 ns/iter 331.931208114234 ns/iter 1.28
JSON_Fast_Hash_Helm_Chart_Lock 102.8451784444138 ns/iter 93.31184851285711 ns/iter 1.10
JSON_Equality_Helm_Chart_Lock 225.29540625001232 ns/iter 161.65257332496557 ns/iter 1.39
JSON_Divisible_By_Decimal 338.9727678571676 ns/iter 282.3704873941777 ns/iter 1.20
JSON_String_Equal/10 11.211362500000225 ns/iter 7.702193080357642 ns/iter 1.46
JSON_String_Equal/100 13.623833928570711 ns/iter 9.527620939607653 ns/iter 1.43
JSON_String_Equal_Small_By_Perfect_Hash/10 2.6281574976531767 ns/iter 1.7056634386422314 ns/iter 1.54
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.30384859685827 ns/iter 10.768793749999617 ns/iter 1.33
JSON_String_Fast_Hash/10 8.369687499999603 ns/iter 5.221812499999804 ns/iter 1.60
JSON_String_Fast_Hash/100 8.735904017857113 ns/iter 4.973531000000548 ns/iter 1.76
JSON_String_Key_Hash/10 5.371653999999353 ns/iter 3.8441351717065744 ns/iter 1.40
JSON_String_Key_Hash/100 11.934183928571786 ns/iter 8.480681919643526 ns/iter 1.41
JSON_Object_Defines_Miss_Same_Length 4.122044650218298 ns/iter 3.1072933035716233 ns/iter 1.33
JSON_Object_Defines_Miss_Too_Small 4.4900837500001956 ns/iter 3.270553598860121 ns/iter 1.37
JSON_Object_Defines_Miss_Too_Large 4.158364618679585 ns/iter 3.2660022321430966 ns/iter 1.27
Pointer_Object_Traverse 71.27039062500324 ns/iter 50.52709821429501 ns/iter 1.41
Pointer_Object_Try_Traverse 71.00433035713901 ns/iter 52.726267857140996 ns/iter 1.35
Pointer_Push_Back_Pointer_To_Weak_Pointer 188.18286501632372 ns/iter 147.46111618476226 ns/iter 1.28
Pointer_Walker_Schema_ISO_Language 10788510.937500106 ns/iter 9801462.666667553 ns/iter 1.10
Pointer_Maybe_Tracked_Deeply_Nested/0 2306316.428571011 ns/iter 1866124.1286862977 ns/iter 1.24
Pointer_Maybe_Tracked_Deeply_Nested/1 3597279.9999993956 ns/iter 2872302.9661014574 ns/iter 1.25
Pointer_Position_Tracker_Get_Deeply_Nested 507.86460364597167 ns/iter 429.22636047505256 ns/iter 1.18
URITemplateRouter_Create 40834.84417619599 ns/iter 29959.08223419411 ns/iter 1.36
URITemplateRouter_Match 236.0765026700652 ns/iter 167.53919425486686 ns/iter 1.41
URITemplateRouter_Match_BasePath 269.9569763373164 ns/iter 189.33668654793127 ns/iter 1.43
URITemplateRouterView_Restore 33416.528383256395 ns/iter 18751.08081322259 ns/iter 1.78
URITemplateRouterView_Match 180.6100678979632 ns/iter 133.7252083158377 ns/iter 1.35
URITemplateRouterView_Match_BasePath 205.90301536148215 ns/iter 152.0646874999849 ns/iter 1.35
URITemplateRouterView_Arguments 532.9371000000265 ns/iter 455.7307998042425 ns/iter 1.17
JSONL_Parse_Large 32956809.523804102 ns/iter 25878792.857144263 ns/iter 1.27
JSONL_Parse_Large_GZIP 33809689.99999823 ns/iter 26024980.769228444 ns/iter 1.30
JSONLD_Catalog_Annotation_List_Populate 2858932.5301205264 ns/iter 2157793.437499933 ns/iter 1.32
JSONLD_Catalog_Materialize 9926037.333334535 ns/iter 6751142.222222168 ns/iter 1.47
HTML_Build_Table_100000 90108828.571439 ns/iter 73115255.55556071 ns/iter 1.23
HTML_Render_Table_100000 8083007.777779332 ns/iter 6557341.964285764 ns/iter 1.23
GZIP_Compress_ISO_Language_Set_3_Locations 36528280.000004545 ns/iter 28113184.000003457 ns/iter 1.30
GZIP_Decompress_ISO_Language_Set_3_Locations 10267569.333333693 ns/iter 7283991.111110784 ns/iter 1.41
GZIP_Compress_ISO_Language_Set_3_Schema 2100663.1884060684 ns/iter 1739133.9066339254 ns/iter 1.21
GZIP_Decompress_ISO_Language_Set_3_Schema 641007.8571430437 ns/iter 393463.6718749829 ns/iter 1.63
JOSE_VerifySignature_RS256 21471.03124999461 ns/iter 20256.12996544466 ns/iter 1.06
JOSE_VerifySignature_ES512 1535018.7500001562 ns/iter 1258020.0892858987 ns/iter 1.22

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

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