Skip to content

Serialise JSON Pointers to JSON as array of tokens#2326

Merged
jviotti merged 1 commit intomainfrom
pointer-json-array
Mar 30, 2026
Merged

Serialise JSON Pointers to JSON as array of tokens#2326
jviotti merged 1 commit intomainfrom
pointer-json-array

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented Mar 30, 2026

So consumers can use them even when not being JSON Pointer aware.

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

So consumers can use them even when not being JSON Pointer aware.

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

augmentcode bot commented Mar 30, 2026

🤖 Augment PR Summary

Summary: This PR changes the JSON auto-serialization format for JSON Pointers so they serialize as a JSON array of tokens instead of a single JSON Pointer string, making the structure usable by consumers that aren’t JSON Pointer aware.

Changes:

  • Removes the previous Pointer/WeakPointer JSON auto-transformers that encoded pointers as RFC6901 strings.
  • Adds GenericPointer::to_json() to serialize pointers as a JSON array, emitting string tokens for properties and integer tokens for array indices.
  • Adds GenericPointer::from_json() to deserialize a Pointer from a JSON token array (string/integer elements).
  • Updates JSON Pointer auto-serialization tests to assert array-of-tokens behavior and round-trip through from_json<Pointer>.
  • Updates JSON Schema frame serialization tests to expect pointer-like fields (parent, pointer, relativePointer, origin) as token arrays (with [] for the empty pointer).

Technical Notes: The new representation preserves index-vs-property intent (integers vs strings) and avoids RFC6901 escaping in serialized output.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

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

result.emplace_back(element.to_string());
} else if (element.is_integer()) {
result.emplace_back(
static_cast<typename Token::Index>(element.to_integer()));
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/jsonpointer/include/sourcemeta/core/jsonpointer_pointer.h:873: Casting element.to_integer() to Token::Index will wrap negative values (and can truncate on narrower platforms), potentially creating invalid pointers that later index the wrong location.

Severity: medium

Fix This in Augment

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

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

1 issue found across 4 files

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/jsonpointer/include/sourcemeta/core/jsonpointer_pointer.h">

<violation number="1" location="src/core/jsonpointer/include/sourcemeta/core/jsonpointer_pointer.h:871">
P2: Reject negative integers before casting to Token::Index. As written, a JSON array like `[-1]` becomes a huge positive index after the unsigned cast.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment on lines +871 to +873
} else if (element.is_integer()) {
result.emplace_back(
static_cast<typename Token::Index>(element.to_integer()));
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot Mar 30, 2026

Choose a reason for hiding this comment

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

P2: Reject negative integers before casting to Token::Index. As written, a JSON array like [-1] becomes a huge positive index after the unsigned cast.

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

<comment>Reject negative integers before casting to Token::Index. As written, a JSON array like `[-1]` becomes a huge positive index after the unsigned cast.</comment>

<file context>
@@ -846,6 +845,40 @@ template <typename PropertyT, typename Hash> class GenericPointer {
+    for (const auto &element : value.as_array()) {
+      if (element.is_string()) {
+        result.emplace_back(element.to_string());
+      } else if (element.is_integer()) {
+        result.emplace_back(
+            static_cast<typename Token::Index>(element.to_integer()));
</file context>
Suggested change
} else if (element.is_integer()) {
result.emplace_back(
static_cast<typename Token::Index>(element.to_integer()));
} else if (element.is_integer()) {
const auto index = element.to_integer();
if (index < 0) {
return std::nullopt;
}
result.emplace_back(static_cast<typename Token::Index>(index));
Fix with Cubic

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

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: bfa4608 Previous: 7e57b20 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 3.517596639333545 ns/iter 3.1137452092163755 ns/iter 1.13
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.5185609776779008 ns/iter 3.1115213317235533 ns/iter 1.13
Regex_Period_Asterisk 3.5158082412491694 ns/iter 3.116440114408641 ns/iter 1.13
Regex_Group_Period_Asterisk_Group 3.515573535418276 ns/iter 3.1111570793015493 ns/iter 1.13
Regex_Period_Plus 3.8699793599518646 ns/iter 3.1175816677338584 ns/iter 1.24
Regex_Period 3.8696813275329744 ns/iter 2.874580196442246 ns/iter 1.35
Regex_Caret_Period_Plus_Dollar 3.870255266166996 ns/iter 2.872000298018297 ns/iter 1.35
Regex_Caret_Group_Period_Plus_Group_Dollar 3.868379637807922 ns/iter 2.8572725288225977 ns/iter 1.35
Regex_Caret_Period_Asterisk_Dollar 3.227958521210441 ns/iter 2.81191090860912 ns/iter 1.15
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.516686523692481 ns/iter 3.1118650582922447 ns/iter 1.13
Regex_Caret_X_Hyphen 11.952758968763595 ns/iter 10.649929600680606 ns/iter 1.12
Regex_Period_Md_Dollar 26.681232195356767 ns/iter 27.3553917358664 ns/iter 0.98
Regex_Caret_Slash_Period_Asterisk 7.735893504205721 ns/iter 7.4690456810279215 ns/iter 1.04
Regex_Caret_Period_Range_Dollar 3.879324325749449 ns/iter 3.112861794608242 ns/iter 1.25
Regex_Nested_Backtrack 47.19305151737205 ns/iter 60.62399420660854 ns/iter 0.78
JSON_Array_Of_Objects_Unique 425.14536109503194 ns/iter 393.5689181135311 ns/iter 1.08
JSON_Parse_1 5692.061125974746 ns/iter 5846.386826435067 ns/iter 0.97
JSON_Parse_Real 10267.854708848854 ns/iter 10790.909705434362 ns/iter 0.95
JSON_Parse_Decimal 11130.960212455073 ns/iter 11993.316539097646 ns/iter 0.93
JSON_Parse_Schema_ISO_Language 3708812.9843751243 ns/iter 3615007.637305979 ns/iter 1.03
JSON_Fast_Hash_Helm_Chart_Lock 65.04940261037407 ns/iter 53.52941760651231 ns/iter 1.22
JSON_Equality_Helm_Chart_Lock 162.6509568829028 ns/iter 154.84750115998915 ns/iter 1.05
JSON_Divisible_By_Decimal 525.5187709545687 ns/iter 633.8438070203914 ns/iter 0.83
JSON_String_Equal/10 5.9822386489107044 ns/iter 6.5450672407192 ns/iter 0.91
JSON_String_Equal/100 6.685109910799227 ns/iter 7.169530467326683 ns/iter 0.93
JSON_String_Equal_Small_By_Perfect_Hash/10 1.0558217888780903 ns/iter 0.9350910333261859 ns/iter 1.13
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 12.335172936836017 ns/iter 10.27236958336476 ns/iter 1.20
JSON_String_Fast_Hash/10 2.1109456827614084 ns/iter 2.1816289763356327 ns/iter 0.97
JSON_String_Fast_Hash/100 2.112297633972841 ns/iter 2.185938495915352 ns/iter 0.97
JSON_String_Key_Hash/10 2.4626831812757186 ns/iter 2.1807868576616425 ns/iter 1.13
JSON_String_Key_Hash/100 7.734535395243031 ns/iter 6.537534000025444 ns/iter 1.18
JSON_Object_Defines_Miss_Same_Length 4.220904436031073 ns/iter 3.884794970663919 ns/iter 1.09
JSON_Object_Defines_Miss_Too_Small 4.218613277170918 ns/iter 3.738467738206891 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Large 4.2196247992769065 ns/iter 3.738880338837763 ns/iter 1.13
Pointer_Object_Traverse 27.213878449645208 ns/iter 25.08246325400988 ns/iter 1.08
Pointer_Object_Try_Traverse 29.542373836764035 ns/iter 27.9706621507931 ns/iter 1.06
Pointer_Push_Back_Pointer_To_Weak_Pointer 172.22812472988215 ns/iter 161.47559516625475 ns/iter 1.07
Pointer_Walker_Schema_ISO_Language 3174116.3524230467 ns/iter 3025025.310638584 ns/iter 1.05
Pointer_Maybe_Tracked_Deeply_Nested/0 1389249.8869046853 ns/iter 1447450.798755331 ns/iter 0.96
Pointer_Maybe_Tracked_Deeply_Nested/1 1733180.4773413965 ns/iter 1742171.8899998951 ns/iter 0.99
Pointer_Position_Tracker_Get_Deeply_Nested 681.9506874863708 ns/iter 608.6404062644464 ns/iter 1.12
Schema_Frame_WoT_References 5309594.176923418 ns/iter 5153533.374999764 ns/iter 1.03
Schema_Frame_OMC_References 24154940.290321566 ns/iter 21220860.999998573 ns/iter 1.14
Schema_Frame_OMC_Locations 21021789.124997526 ns/iter 19593573.027779914 ns/iter 1.07
Schema_Frame_ISO_Language_Locations 101893918.00001128 ns/iter 100969018.9999901 ns/iter 1.01
Schema_Frame_KrakenD_References 41850820.823529996 ns/iter 41260132.823528215 ns/iter 1.01
Schema_Frame_KrakenD_Reachable 658317377.000003 ns/iter 609506119.9999918 ns/iter 1.08
Schema_Iterator_ISO_Language 2380468.05704712 ns/iter 2287187.1967213266 ns/iter 1.04
Schema_Frame_ISO_Language_Locations_To_JSON 101153233.6000073 ns/iter 110643625.4000073 ns/iter 0.91
Schema_Tracker_ISO_Language 5030411.290000529 ns/iter 5046278.9361700155 ns/iter 1.00
Schema_Tracker_ISO_Language_To_JSON 18050682.666666828 ns/iter 19114711.63889031 ns/iter 0.94
Schema_Format_ISO_Language_To_JSON 110149559.66667609 ns/iter 108128904.83333604 ns/iter 1.02
Schema_Bundle_Meta_2020_12 1696496.840193363 ns/iter 1671957.702380193 ns/iter 1.01
Schema_Frame_Many_Resources_References 378037667.9999904 ns/iter 376467993.00000566 ns/iter 1.00
Alterschema_Check_Readibility_ISO_Language_Set_3 208805641.3333182 ns/iter 212159060.0000142 ns/iter 0.98
Alterschema_Check_Readibility_OMC 35411621.100001864 ns/iter 33467008.571424883 ns/iter 1.06
Alterschema_Apply_Readibility_KrakenD 643804713.0000086 ns/iter 614082737.9999791 ns/iter 1.05
Alterschema_Check_Invalid_External_Refs 114774672.99999945 ns/iter 121215152.33332048 ns/iter 0.95
EditorSchema_ForEditor_EmbeddedResources 14081834.204083472 ns/iter 13904478.179995293 ns/iter 1.01
URITemplateRouter_Create 14530.691768172832 ns/iter 17057.01274825129 ns/iter 0.85
URITemplateRouter_Match 177.50429854573167 ns/iter 168.0854859632517 ns/iter 1.06
URITemplateRouterView_Restore 6287.532957418763 ns/iter 4981.084750118988 ns/iter 1.26
URITemplateRouterView_Match 146.2307378474914 ns/iter 154.91780448659293 ns/iter 0.94
URITemplateRouterView_Arguments 472.7099810556064 ns/iter 455.3930501824412 ns/iter 1.04
HTML_Build_Table_100000 85379786.50001322 ns/iter 63433070.72728004 ns/iter 1.35
HTML_Render_Table_100000 4896204.664335725 ns/iter 5408433.664062073 ns/iter 0.91

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

@jviotti jviotti merged commit 243b56e into main Mar 30, 2026
13 checks passed
@jviotti jviotti deleted the pointer-json-array branch March 30, 2026 19:31
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

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: bfa4608 Previous: 7e57b20 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 4.435366797144754 ns/iter 4.430538480165201 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 5.029108000001088 ns/iter 5.034508999999616 ns/iter 1.00
Regex_Period_Asterisk 4.397217587322375 ns/iter 4.418797499999982 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 5.026428999999553 ns/iter 5.028142999999545 ns/iter 1.00
Regex_Period_Plus 4.082443400146484 ns/iter 4.090538569602194 ns/iter 1.00
Regex_Period 4.077638042995302 ns/iter 4.100092641249537 ns/iter 0.99
Regex_Caret_Period_Plus_Dollar 4.724112143910977 ns/iter 4.719295992675745 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 4.711801528609175 ns/iter 4.717038884981851 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 5.021833999999217 ns/iter 5.044339000000946 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 5.042129999999361 ns/iter 5.042992857141826 ns/iter 1.00
Regex_Caret_X_Hyphen 7.87824776785787 ns/iter 7.865457554172093 ns/iter 1.00
Regex_Period_Md_Dollar 37.85562273756562 ns/iter 35.774367603119046 ns/iter 1.06
Regex_Caret_Slash_Period_Asterisk 7.874663392856616 ns/iter 7.860351562502135 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 5.024777999999515 ns/iter 5.0819479999995565 ns/iter 0.99
Regex_Nested_Backtrack 93.14530834172226 ns/iter 96.595040330573 ns/iter 0.96
JSON_Array_Of_Objects_Unique 495.69142857137655 ns/iter 495.4347999998845 ns/iter 1.00
JSON_Parse_1 8044.397321429793 ns/iter 8039.3437499992615 ns/iter 1.00
JSON_Parse_Real 15928.983229800337 ns/iter 16337.919642858928 ns/iter 0.97
JSON_Parse_Decimal 15848.103223905075 ns/iter 16444.302305596913 ns/iter 0.96
JSON_Parse_Schema_ISO_Language 5936688.392856533 ns/iter 6193874.107142149 ns/iter 0.96
JSON_Fast_Hash_Helm_Chart_Lock 65.8261785714233 ns/iter 68.77609821428011 ns/iter 0.96
JSON_Equality_Helm_Chart_Lock 279.29031788877563 ns/iter 279.8692508987498 ns/iter 1.00
JSON_Divisible_By_Decimal 1153.1905357145433 ns/iter 1145.9737499998416 ns/iter 1.01
JSON_String_Equal/10 13.17612142857375 ns/iter 13.195912499997219 ns/iter 1.00
JSON_String_Equal/100 13.803780072306623 ns/iter 13.545826785714 ns/iter 1.02
JSON_String_Equal_Small_By_Perfect_Hash/10 1.884057207718224 ns/iter 1.8836330373960473 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 12.880005357142668 ns/iter 12.74620178571289 ns/iter 1.01
JSON_String_Fast_Hash/10 3.9125357142845627 ns/iter 3.8761935876924696 ns/iter 1.01
JSON_String_Fast_Hash/100 3.9241880580360395 ns/iter 3.813296316963794 ns/iter 1.03
JSON_String_Key_Hash/10 3.802780171780567 ns/iter 4.024610491071913 ns/iter 0.94
JSON_String_Key_Hash/100 14.520680292319073 ns/iter 17.315090062621604 ns/iter 0.84
JSON_Object_Defines_Miss_Same_Length 3.8238699175432473 ns/iter 3.9476757659780497 ns/iter 0.97
JSON_Object_Defines_Miss_Too_Small 3.787781778950375 ns/iter 3.9343833705363096 ns/iter 0.96
JSON_Object_Defines_Miss_Too_Large 3.7828912432448063 ns/iter 3.8879006696428724 ns/iter 0.97
Pointer_Object_Traverse 42.06626681191718 ns/iter 41.523726882237405 ns/iter 1.01
Pointer_Object_Try_Traverse 52.43914999998651 ns/iter 53.606089999993856 ns/iter 0.98
Pointer_Push_Back_Pointer_To_Weak_Pointer 172.28670126920053 ns/iter 182.14841804893547 ns/iter 0.95
Pointer_Walker_Schema_ISO_Language 11313524.999998491 ns/iter 12647444.642855784 ns/iter 0.89
Pointer_Maybe_Tracked_Deeply_Nested/0 2116508.928571648 ns/iter 2094036.742424564 ns/iter 1.01
Pointer_Maybe_Tracked_Deeply_Nested/1 3165631.2499990235 ns/iter 3275401.785714394 ns/iter 0.97
Pointer_Position_Tracker_Get_Deeply_Nested 626.8292598345522 ns/iter 611.229464285807 ns/iter 1.03
Schema_Frame_WoT_References 10482386.666668996 ns/iter 10329701.562501015 ns/iter 1.01
Schema_Frame_OMC_References 43687413.3333428 ns/iter 46304059.99999615 ns/iter 0.94
Schema_Frame_OMC_Locations 40016758.823532976 ns/iter 44782737.50000028 ns/iter 0.89
Schema_Frame_ISO_Language_Locations 193377433.33335313 ns/iter 219273900.00003776 ns/iter 0.88
Schema_Frame_KrakenD_References 90679714.28570282 ns/iter 97167728.57141873 ns/iter 0.93
Schema_Frame_KrakenD_Reachable 505019899.9999793 ns/iter 557206199.9998823 ns/iter 0.91
Schema_Iterator_ISO_Language 5180016.071428944 ns/iter 4932151.99999895 ns/iter 1.05
Schema_Frame_ISO_Language_Locations_To_JSON 226602866.66662917 ns/iter 301655699.9999693 ns/iter 0.75
Schema_Tracker_ISO_Language 16089328.888887797 ns/iter 16575897.560975002 ns/iter 0.97
Schema_Tracker_ISO_Language_To_JSON 48445728.57142079 ns/iter 50393289.99998815 ns/iter 0.96
Schema_Format_ISO_Language_To_JSON 193249449.99999616 ns/iter 208267533.33335546 ns/iter 0.93
Schema_Bundle_Meta_2020_12 2904227.5423731646 ns/iter 2972438.135594661 ns/iter 0.98
Schema_Frame_Many_Resources_References 1494682899.9998162 ns/iter 1510271200.0000339 ns/iter 0.99
Alterschema_Check_Readibility_ISO_Language_Set_3 319485050.0000257 ns/iter 335995699.99989855 ns/iter 0.95
Alterschema_Check_Readibility_OMC 60572563.63634555 ns/iter 62640927.27273733 ns/iter 0.97
Alterschema_Apply_Readibility_KrakenD 980386500.0001224 ns/iter 1088589700.0002842 ns/iter 0.90
Alterschema_Check_Invalid_External_Refs 144095060.00001782 ns/iter 152482374.99997684 ns/iter 0.94
EditorSchema_ForEditor_EmbeddedResources 28378432.000044994 ns/iter 29774670.83332878 ns/iter 0.95
URITemplateRouter_Create 22306.153125001063 ns/iter 22754.113235340337 ns/iter 0.98
URITemplateRouter_Match 205.27083235399633 ns/iter 206.67137916641627 ns/iter 0.99
URITemplateRouterView_Restore 29233.449255696643 ns/iter 31149.464285716378 ns/iter 0.94
URITemplateRouterView_Match 172.12587536556111 ns/iter 151.56303571427338 ns/iter 1.14
URITemplateRouterView_Arguments 444.57481249992264 ns/iter 444.7894375000772 ns/iter 1.00
HTML_Build_Table_100000 86698055.55554275 ns/iter 88784371.42857364 ns/iter 0.98
HTML_Render_Table_100000 7634823.21428707 ns/iter 8140554.444445217 ns/iter 0.94

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

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

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: bfa4608 Previous: 7e57b20 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.672270061637458 ns/iter 1.832109876189336 ns/iter 0.91
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.6793301658830353 ns/iter 1.804285245150599 ns/iter 0.93
Regex_Period_Asterisk 1.6691247685379096 ns/iter 1.7915375264246642 ns/iter 0.93
Regex_Group_Period_Asterisk_Group 1.7752667023545616 ns/iter 1.8211582769563333 ns/iter 0.97
Regex_Period_Plus 2.1028558812325886 ns/iter 2.1553975501944516 ns/iter 0.98
Regex_Period 2.020438902356925 ns/iter 2.1170187535352176 ns/iter 0.95
Regex_Caret_Period_Plus_Dollar 2.0164537300024956 ns/iter 2.184106809531731 ns/iter 0.92
Regex_Caret_Group_Period_Plus_Group_Dollar 2.0045675892142487 ns/iter 2.224755545232308 ns/iter 0.90
Regex_Caret_Period_Asterisk_Dollar 1.6852273230978991 ns/iter 1.941255186121557 ns/iter 0.87
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.6632147421227506 ns/iter 1.8284941272779942 ns/iter 0.91
Regex_Caret_X_Hyphen 6.391715743482055 ns/iter 7.091213728936822 ns/iter 0.90
Regex_Period_Md_Dollar 20.381403257509106 ns/iter 22.584706014133573 ns/iter 0.90
Regex_Caret_Slash_Period_Asterisk 5.138136615088488 ns/iter 5.1847589220503085 ns/iter 0.99
Regex_Caret_Period_Range_Dollar 2.6487256114932523 ns/iter 2.145525823677345 ns/iter 1.23
Regex_Nested_Backtrack 35.89255015570516 ns/iter 29.40750016433724 ns/iter 1.22
JSON_Array_Of_Objects_Unique 509.79965463788204 ns/iter 357.3053671489704 ns/iter 1.43
JSON_Parse_1 3950.8226816751294 ns/iter 4304.324091985097 ns/iter 0.92
JSON_Parse_Real 6405.172834685336 ns/iter 6894.685200729202 ns/iter 0.93
JSON_Parse_Decimal 8472.223517135071 ns/iter 8437.876491256502 ns/iter 1.00
JSON_Parse_Schema_ISO_Language 3899487.0129874772 ns/iter 4976619.2052979125 ns/iter 0.78
JSON_Fast_Hash_Helm_Chart_Lock 57.40701841034346 ns/iter 64.30867643201415 ns/iter 0.89
JSON_Equality_Helm_Chart_Lock 131.55847055576035 ns/iter 132.10153881316796 ns/iter 1.00
JSON_Divisible_By_Decimal 423.9403269801421 ns/iter 452.4990951893355 ns/iter 0.94
JSON_String_Equal/10 6.537240374903058 ns/iter 7.102393381620991 ns/iter 0.92
JSON_String_Equal/100 6.229734421751688 ns/iter 6.4629821686524105 ns/iter 0.96
JSON_String_Equal_Small_By_Perfect_Hash/10 0.7362199763779816 ns/iter 0.8155136621654437 ns/iter 0.90
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.240079473309766 ns/iter 3.342122941969608 ns/iter 0.97
JSON_String_Fast_Hash/10 2.312352606214128 ns/iter 2.479521445534979 ns/iter 0.93
JSON_String_Fast_Hash/100 2.149310818899338 ns/iter 2.0555250172820707 ns/iter 1.05
JSON_String_Key_Hash/10 1.3445964880683243 ns/iter 1.3603150591066344 ns/iter 0.99
JSON_String_Key_Hash/100 2.674769111612968 ns/iter 2.175397676988314 ns/iter 1.23
JSON_Object_Defines_Miss_Same_Length 2.5789977247684726 ns/iter 2.6052589345787345 ns/iter 0.99
JSON_Object_Defines_Miss_Too_Small 2.4801070737816002 ns/iter 2.659639684729936 ns/iter 0.93
JSON_Object_Defines_Miss_Too_Large 2.423933534220983 ns/iter 2.447931552970259 ns/iter 0.99
Pointer_Object_Traverse 16.23227200495826 ns/iter 15.425581897957779 ns/iter 1.05
Pointer_Object_Try_Traverse 20.160121516949047 ns/iter 20.44958361720747 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 166.26917933192954 ns/iter 158.91850073177886 ns/iter 1.05
Pointer_Walker_Schema_ISO_Language 4648473.270440006 ns/iter 4777012.500000334 ns/iter 0.97
Pointer_Maybe_Tracked_Deeply_Nested/0 1345808.1539735475 ns/iter 1013433.7923727027 ns/iter 1.33
Pointer_Maybe_Tracked_Deeply_Nested/1 1362797.8971960156 ns/iter 1661232.9906368183 ns/iter 0.82
Pointer_Position_Tracker_Get_Deeply_Nested 361.69082481263297 ns/iter 400.8936378572446 ns/iter 0.90
Schema_Frame_WoT_References 5206023.749999531 ns/iter 4853270.992366526 ns/iter 1.07
Schema_Frame_OMC_References 28433517.375001807 ns/iter 26726955.115385372 ns/iter 1.06
Schema_Frame_OMC_Locations 24449080.35714986 ns/iter 28629065.999998223 ns/iter 0.85
Schema_Frame_ISO_Language_Locations 84736614.62500104 ns/iter 74409557.37502009 ns/iter 1.14
Schema_Frame_KrakenD_References 55812645.900005005 ns/iter 48707380.92857404 ns/iter 1.15
Schema_Frame_KrakenD_Reachable 487740062.50005186 ns/iter 395172915.99986494 ns/iter 1.23
Schema_Iterator_ISO_Language 2273786.607344517 ns/iter 2026526.3644065312 ns/iter 1.12
Schema_Frame_ISO_Language_Locations_To_JSON 81269107.14288117 ns/iter 100789173.50002332 ns/iter 0.81
Schema_Tracker_ISO_Language 12383336.065575529 ns/iter 9383691.243588379 ns/iter 1.32
Schema_Tracker_ISO_Language_To_JSON 20081700.970589574 ns/iter 14477604.166666918 ns/iter 1.39
Schema_Format_ISO_Language_To_JSON 79390552.24997559 ns/iter 77816270.87499033 ns/iter 1.02
Schema_Bundle_Meta_2020_12 1340082.4676840224 ns/iter 1319734.6909461033 ns/iter 1.02
Schema_Frame_Many_Resources_References 298960680.6666719 ns/iter 287512583.00007975 ns/iter 1.04
Alterschema_Check_Readibility_ISO_Language_Set_3 146436600.00001544 ns/iter 141871775.00002688 ns/iter 1.03
Alterschema_Check_Readibility_OMC 31653011.904760808 ns/iter 41664160.71429272 ns/iter 0.76
Alterschema_Apply_Readibility_KrakenD 439673687.99997073 ns/iter 484015249.9999704 ns/iter 0.91
Alterschema_Check_Invalid_External_Refs 61283961.83332067 ns/iter 67017037.499999784 ns/iter 0.91
EditorSchema_ForEditor_EmbeddedResources 10158320.71015132 ns/iter 10920876.246161873 ns/iter 0.93
URITemplateRouter_Create 15915.124414112088 ns/iter 16488.789984766227 ns/iter 0.97
URITemplateRouter_Match 166.9572301960278 ns/iter 165.38160940068946 ns/iter 1.01
URITemplateRouterView_Restore 14292.778021059476 ns/iter 12765.587375887924 ns/iter 1.12
URITemplateRouterView_Match 134.20113339523203 ns/iter 136.4409301547426 ns/iter 0.98
URITemplateRouterView_Arguments 401.9751937302954 ns/iter 410.17448918386054 ns/iter 0.98
HTML_Build_Table_100000 66917525.99999745 ns/iter 68535283.30000244 ns/iter 0.98
HTML_Render_Table_100000 2770130.4945047335 ns/iter 3975207.5843377593 ns/iter 0.70

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

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

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: bfa4608 Previous: 7e57b20 Ratio
HTML_Build_Table_100000 71262843.09999846 ns/iter 64356431.818189524 ns/iter 1.11
HTML_Render_Table_100000 4896630.354165962 ns/iter 5438543.128787622 ns/iter 0.90
URITemplateRouter_Create 13840.685897817417 ns/iter 15005.650439946556 ns/iter 0.92
URITemplateRouter_Match 155.38735488106911 ns/iter 158.23397322664349 ns/iter 0.98
URITemplateRouterView_Restore 6250.110234709872 ns/iter 6220.579729092906 ns/iter 1.00
URITemplateRouterView_Match 129.6648079483573 ns/iter 126.60778986634111 ns/iter 1.02
URITemplateRouterView_Arguments 450.0226056821091 ns/iter 470.06003363344354 ns/iter 0.96
EditorSchema_ForEditor_EmbeddedResources 14275628.897964954 ns/iter 14000736.460011467 ns/iter 1.02
Alterschema_Check_Readibility_ISO_Language_Set_3 201841149.66665828 ns/iter 205596540.99997714 ns/iter 0.98
Alterschema_Check_Readibility_OMC 35068176.65000881 ns/iter 33681398.04761735 ns/iter 1.04
Alterschema_Apply_Readibility_KrakenD 554278378.9999248 ns/iter 562236822.9999211 ns/iter 0.99
Alterschema_Check_Invalid_External_Refs 111479121.00000213 ns/iter 122026457.8333475 ns/iter 0.91
Schema_Frame_WoT_References 5732626.709677715 ns/iter 5451877.782945317 ns/iter 1.05
Schema_Frame_OMC_References 23034044.966667958 ns/iter 22173843.281251494 ns/iter 1.04
Schema_Frame_OMC_Locations 21368285.636361346 ns/iter 20504965.499994528 ns/iter 1.04
Schema_Frame_ISO_Language_Locations 99886020.9999748 ns/iter 99052883.00001302 ns/iter 1.01
Schema_Frame_KrakenD_References 41922343.176472224 ns/iter 39202545.9444388 ns/iter 1.07
Schema_Frame_KrakenD_Reachable 568126105.9999088 ns/iter 532153658.9999596 ns/iter 1.07
Schema_Iterator_ISO_Language 2463192.252631224 ns/iter 2597906.9666669196 ns/iter 0.95
Schema_Frame_ISO_Language_Locations_To_JSON 243819983.0000182 ns/iter 216310787.33336532 ns/iter 1.13
Schema_Tracker_ISO_Language 4823649.896551897 ns/iter 4827170.744827778 ns/iter 1.00
Schema_Tracker_ISO_Language_To_JSON 22295274.064515155 ns/iter 22371589.387097217 ns/iter 1.00
Schema_Format_ISO_Language_To_JSON 108465377.99995661 ns/iter 105279389.71430169 ns/iter 1.03
Schema_Bundle_Meta_2020_12 1798661.359897028 ns/iter 1830341.4597415791 ns/iter 0.98
Schema_Frame_Many_Resources_References 382745688 ns/iter 371185514.9999792 ns/iter 1.03
Pointer_Object_Traverse 26.93476211089546 ns/iter 26.021277167656635 ns/iter 1.04
Pointer_Object_Try_Traverse 26.89679229087245 ns/iter 24.51031040529104 ns/iter 1.10
Pointer_Push_Back_Pointer_To_Weak_Pointer 159.43965440993094 ns/iter 167.6563748660017 ns/iter 0.95
Pointer_Walker_Schema_ISO_Language 3753531.779569042 ns/iter 3370566.165876794 ns/iter 1.11
Pointer_Maybe_Tracked_Deeply_Nested/0 1529311.7736261622 ns/iter 1542927.1655627254 ns/iter 0.99
Pointer_Maybe_Tracked_Deeply_Nested/1 1767623.338383426 ns/iter 1772419.0610682734 ns/iter 1.00
Pointer_Position_Tracker_Get_Deeply_Nested 427.9532970968252 ns/iter 426.02328928384486 ns/iter 1.00
JSON_Array_Of_Objects_Unique 433.5632641667732 ns/iter 441.22264508620503 ns/iter 0.98
JSON_Parse_1 7831.238466689529 ns/iter 8017.91529599681 ns/iter 0.98
JSON_Parse_Real 12103.973677432696 ns/iter 12388.400589438954 ns/iter 0.98
JSON_Parse_Decimal 17186.823545388666 ns/iter 18174.76071521302 ns/iter 0.95
JSON_Parse_Schema_ISO_Language 4769160.770270238 ns/iter 4714942.630435093 ns/iter 1.01
JSON_Fast_Hash_Helm_Chart_Lock 66.3524264491742 ns/iter 71.30549468614922 ns/iter 0.93
JSON_Equality_Helm_Chart_Lock 173.61867558061888 ns/iter 162.43378920121074 ns/iter 1.07
JSON_Divisible_By_Decimal 477.37722844445466 ns/iter 571.7336100402972 ns/iter 0.83
JSON_String_Equal/10 6.428141951087197 ns/iter 6.622978876526731 ns/iter 0.97
JSON_String_Equal/100 7.130859286100553 ns/iter 7.2446023361009635 ns/iter 0.98
JSON_String_Equal_Small_By_Perfect_Hash/10 0.713583321266709 ns/iter 0.7473358471358973 ns/iter 0.95
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 23.19252975072882 ns/iter 19.665346833381157 ns/iter 1.18
JSON_String_Fast_Hash/10 1.0558423396308065 ns/iter 0.933964059034674 ns/iter 1.13
JSON_String_Fast_Hash/100 1.0561299525054817 ns/iter 0.9338408700629476 ns/iter 1.13
JSON_String_Key_Hash/10 1.7601928071590858 ns/iter 1.5577621501872763 ns/iter 1.13
JSON_String_Key_Hash/100 14.837553895272913 ns/iter 12.439850447646913 ns/iter 1.19
JSON_Object_Defines_Miss_Same_Length 3.8706632669485512 ns/iter 3.4239221620217806 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Small 3.5191127605673653 ns/iter 3.425667306149305 ns/iter 1.03
JSON_Object_Defines_Miss_Too_Large 3.5266401739990503 ns/iter 3.4240378248783214 ns/iter 1.03
Regex_Lower_S_Or_Upper_S_Asterisk 1.4077284450991816 ns/iter 1.2453049386197363 ns/iter 1.13
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.7621338919483034 ns/iter 1.5812644453084008 ns/iter 1.11
Regex_Period_Asterisk 1.7663290215315115 ns/iter 1.5574653263769966 ns/iter 1.13
Regex_Group_Period_Asterisk_Group 1.7604835091051618 ns/iter 1.5574337410551815 ns/iter 1.13
Regex_Period_Plus 1.7578002522701186 ns/iter 1.5578491690772835 ns/iter 1.13
Regex_Period 1.7591361958447702 ns/iter 1.5841237794816552 ns/iter 1.11
Regex_Caret_Period_Plus_Dollar 1.7596319009204875 ns/iter 1.558422526339469 ns/iter 1.13
Regex_Caret_Group_Period_Plus_Group_Dollar 1.4071911126681385 ns/iter 1.555894766180725 ns/iter 0.90
Regex_Caret_Period_Asterisk_Dollar 1.4069903451917822 ns/iter 1.5557827240488542 ns/iter 0.90
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.408627714258463 ns/iter 1.246420163706472 ns/iter 1.13
Regex_Caret_X_Hyphen 11.955167997963057 ns/iter 12.814956563557859 ns/iter 0.93
Regex_Period_Md_Dollar 34.1885385731964 ns/iter 44.42153840023804 ns/iter 0.77
Regex_Caret_Slash_Period_Asterisk 4.22142031811013 ns/iter 4.666618935854488 ns/iter 0.90
Regex_Caret_Period_Range_Dollar 1.410889095740744 ns/iter 1.5562465192357025 ns/iter 0.91
Regex_Nested_Backtrack 54.686746120364155 ns/iter 51.43844508470207 ns/iter 1.06

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