Skip to content

Fix JSON array construction depending on initializer list arity - #2718

Merged
jviotti merged 1 commit into
mainfrom
json-initialiser-fix
Aug 9, 2026
Merged

Fix JSON array construction depending on initializer list arity#2718
jviotti merged 1 commit into
mainfrom
json-initialiser-fix

Conversation

@jviotti

@jviotti jviotti commented Aug 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>
@augmentcode

augmentcode Bot commented Aug 9, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR fixes ambiguous JSON brace construction when an initializer list contains a single element.

Changes:

  • Removes the public `JSON(std::initializer_list<JSON>)` array constructor.
  • Adds `JSON::make_array(std::initializer_list<JSON>)` as the explicit array-construction API.
  • Builds the new array factory from a null JSON value, then activates its array storage.
  • Removes compiler-specific handling for one-element direct-list initialization.
  • Updates JSON array, stringify, prettify, and stream tests to use the factory.
  • Adds coverage for empty, one-element, multi-element, and nested-array factories.
Technical notes: Brace-initializing a `JSON` from another `JSON` now consistently selects copy construction, while array intent is expressed explicitly through `make_array`.

🤖 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. No suggestions at this time.

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

@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: 4a51d3d Previous: 38f833c Ratio
JOSE_VerifySignature_RS256 19147.040060569765 ns/iter 24677.363199607877 ns/iter 0.78
JOSE_VerifySignature_ES512 498428.24128112063 ns/iter 642440.2960586202 ns/iter 0.78
GZIP_Compress_ISO_Language_Set_3_Locations 30068820.69565148 ns/iter 39363638.66666347 ns/iter 0.76
GZIP_Decompress_ISO_Language_Set_3_Locations 2734544.535156314 ns/iter 4060793.1046512807 ns/iter 0.67
GZIP_Compress_ISO_Language_Set_3_Schema 1751783.3725000287 ns/iter 2282207.009771952 ns/iter 0.77
GZIP_Decompress_ISO_Language_Set_3_Schema 195882.8627746138 ns/iter 275574.58795752283 ns/iter 0.71
HTML_Build_Table_100000 52522841.30769498 ns/iter 69621945.29999124 ns/iter 0.75
HTML_Render_Table_100000 1815022.1373055293 ns/iter 2082317.6096098348 ns/iter 0.87
JSONLD_Catalog_Annotation_List_Populate 1153080.7004910174 ns/iter 1509145.907526809 ns/iter 0.76
JSONLD_Catalog_Materialize 3372845.507176984 ns/iter 6922635.465346024 ns/iter 0.49
JSONL_Parse_Large 7544109.586956191 ns/iter 13032454.203703813 ns/iter 0.58
JSONL_Parse_Large_GZIP 8704723.850000562 ns/iter 14455026.29166621 ns/iter 0.60
URITemplateRouter_Create 22011.091218961847 ns/iter 30335.033116884777 ns/iter 0.73
URITemplateRouter_Match 110.21559868584806 ns/iter 150.43234490574994 ns/iter 0.73
URITemplateRouter_Match_BasePath 132.73069519842343 ns/iter 181.23557674022447 ns/iter 0.73
URITemplateRouterView_Restore 7797.299780773998 ns/iter 9920.899968199976 ns/iter 0.79
URITemplateRouterView_Match 93.32364302716633 ns/iter 124.5271705055076 ns/iter 0.75
URITemplateRouterView_Match_BasePath 104.67990141304396 ns/iter 143.03656123938146 ns/iter 0.73
URITemplateRouterView_Arguments 360.0314567541584 ns/iter 465.63687563009603 ns/iter 0.77
JSONPath_Descendant_Filter_Nested 1395.5209622264929 ns/iter 1810.500743133943 ns/iter 0.77
Pointer_Object_Traverse 18.93662836755017 ns/iter 32.509533894843436 ns/iter 0.58
Pointer_Object_Try_Traverse 22.098400661863337 ns/iter 25.755361517247692 ns/iter 0.86
Pointer_Push_Back_Pointer_To_Weak_Pointer 120.44340380222754 ns/iter 155.02719405472476 ns/iter 0.78
Pointer_Walker_Schema_ISO_Language 2077619.901162803 ns/iter 2598621.2490839274 ns/iter 0.80
Pointer_Maybe_Tracked_Deeply_Nested/0 940748.7206476709 ns/iter 1882352.3485253954 ns/iter 0.50
Pointer_Maybe_Tracked_Deeply_Nested/1 1272433.2232302993 ns/iter 1642566.0563381098 ns/iter 0.77
Pointer_Position_Tracker_Get_Deeply_Nested 319.81699881257936 ns/iter 432.8045784194959 ns/iter 0.74
JSON_Array_Of_Objects_Unique 365.33843753681964 ns/iter 445.5404551113932 ns/iter 0.82
JSON_Parse_1 4091.251243271022 ns/iter 9281.184286225862 ns/iter 0.44
JSON_Parse_Real 4264.03159957652 ns/iter 7769.834793671676 ns/iter 0.55
JSON_Parse_Decimal 6643.024353205421 ns/iter 11207.91741662222 ns/iter 0.59
JSON_Parse_Schema_ISO_Language 2882144.9173553134 ns/iter 6640228.59433973 ns/iter 0.43
JSON_Parse_Integer 2936.3024190499577 ns/iter 5929.6925660251345 ns/iter 0.50
JSON_Parse_String_NonSSO_Plain 4348.487488098139 ns/iter 12126.394669940686 ns/iter 0.36
JSON_Parse_String_SSO_Plain 2247.2661554080687 ns/iter 5079.305848076464 ns/iter 0.44
JSON_Parse_String_Escape_Heavy 14577.370183869472 ns/iter 24781.921883280884 ns/iter 0.59
JSON_Parse_Object_Short_Keys 6954.877491096879 ns/iter 14254.898237081905 ns/iter 0.49
JSON_Parse_Object_Scalar_Properties 3461.430008432052 ns/iter 7333.798290312652 ns/iter 0.47
JSON_Parse_Object_Array_Properties 5302.077000575192 ns/iter 12715.218830303476 ns/iter 0.42
JSON_Parse_Object_Object_Properties 5244.656896965102 ns/iter 12184.37504579515 ns/iter 0.43
JSON_Parse_Nested_Containers 39002.0535564904 ns/iter 98886.82556156139 ns/iter 0.39
JSON_From_String_Copy 15.165637249969787 ns/iter 21.945456153421844 ns/iter 0.69
JSON_From_String_Temporary 12.413192727007507 ns/iter 22.769221737292863 ns/iter 0.55
JSON_Number_To_Double 15.283379042245299 ns/iter 19.70019297570391 ns/iter 0.78
JSON_Object_At_Last_Key/8 3.251356323399541 ns/iter 6.338534625627492 ns/iter 0.51
JSON_Object_At_Last_Key/32 10.450444487409266 ns/iter 23.582743042099228 ns/iter 0.44
JSON_Object_At_Last_Key/128 36.75193838709906 ns/iter 91.14780685582751 ns/iter 0.40
JSON_Object_At_Last_Key/512 213.31942587069332 ns/iter 379.4315297370175 ns/iter 0.56
JSON_Fast_Hash_Helm_Chart_Lock 73.38250755722233 ns/iter 89.2745961555449 ns/iter 0.82
JSON_Equality_Helm_Chart_Lock 114.49537188394424 ns/iter 143.3374494972646 ns/iter 0.80
JSON_Divisible_By_Decimal 202.66320705475647 ns/iter 257.7341651138234 ns/iter 0.79
JSON_String_Equal/10 4.196015012881467 ns/iter 6.115663475048155 ns/iter 0.69
JSON_String_Equal/100 5.015057716822696 ns/iter 6.114416270007677 ns/iter 0.82
JSON_String_Equal_Small_By_Perfect_Hash/10 0.5534562176640243 ns/iter 0.7124478266593809 ns/iter 0.78
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 17.02206788436734 ns/iter 21.93761281272912 ns/iter 0.78
JSON_String_Fast_Hash/10 2.3047259498730943 ns/iter 2.595207117650836 ns/iter 0.89
JSON_String_Fast_Hash/100 2.284196731551963 ns/iter 2.595867923210405 ns/iter 0.88
JSON_String_Key_Hash/10 0.8420792803026156 ns/iter 1.0855092671821018 ns/iter 0.78
JSON_String_Key_Hash/100 11.445986419017217 ns/iter 14.772412244258211 ns/iter 0.77
JSON_Object_Defines_Miss_Same_Length 2.729521518685514 ns/iter 3.1670700024651133 ns/iter 0.86
JSON_Object_Defines_Miss_Too_Small 2.4570308002996346 ns/iter 3.867788984430721 ns/iter 0.64
JSON_Object_Defines_Miss_Too_Large 2.4547924387247275 ns/iter 3.164667899884902 ns/iter 0.78
Regex_Lower_S_Or_Upper_S_Asterisk 0.5455104334966046 ns/iter 0.7035066856987443 ns/iter 0.78
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.8189135889517424 ns/iter 0.7038033501238246 ns/iter 1.16
Regex_Period_Asterisk 0.5456358467578112 ns/iter 0.7036849608796149 ns/iter 0.78
Regex_Group_Period_Asterisk_Group 0.8187128356883047 ns/iter 0.7037509417990238 ns/iter 1.16
Regex_Period_Plus 0.5575422607008612 ns/iter 0.7036182177749323 ns/iter 0.79
Regex_Period 0.8207173236457764 ns/iter 0.7037277342437508 ns/iter 1.17
Regex_Caret_Period_Plus_Dollar 0.5454710287013163 ns/iter 0.7042739464304041 ns/iter 0.77
Regex_Caret_Group_Period_Plus_Group_Dollar 0.8185639378553484 ns/iter 0.7033833764792197 ns/iter 1.16
Regex_Caret_Period_Asterisk_Dollar 0.545539427556966 ns/iter 0.7039896087055046 ns/iter 0.77
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.820847509850027 ns/iter 0.7037449271038574 ns/iter 1.17
Regex_Caret_X_Hyphen 2.7276060617642632 ns/iter 3.516246409118361 ns/iter 0.78
Regex_Period_Md_Dollar 26.13689176887418 ns/iter 33.92454047847055 ns/iter 0.77
Regex_Caret_Slash_Period_Asterisk 2.726779329237357 ns/iter 3.866538580655264 ns/iter 0.71
Regex_Caret_Period_Range_Dollar 1.3644625716703167 ns/iter 1.4072788487841938 ns/iter 0.97
Regex_Nested_Backtrack 31.68704843850372 ns/iter 40.62011951413796 ns/iter 0.78

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 (macos/llvm)

Details
Benchmark suite Current: 4a51d3d Previous: 38f833c Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.6955805656504888 ns/iter 1.7461936162061356 ns/iter 0.97
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.6955025859418806 ns/iter 1.705098791735679 ns/iter 0.99
Regex_Period_Asterisk 1.696776812948298 ns/iter 1.5797834052002238 ns/iter 1.07
Regex_Group_Period_Asterisk_Group 2.133180801955087 ns/iter 1.5889987988310668 ns/iter 1.34
Regex_Period_Plus 2.3126925102382834 ns/iter 1.9071713682454117 ns/iter 1.21
Regex_Period 2.2259587979324102 ns/iter 1.8820469126258066 ns/iter 1.18
Regex_Caret_Period_Plus_Dollar 2.2579697607424514 ns/iter 1.881775680337896 ns/iter 1.20
Regex_Caret_Group_Period_Plus_Group_Dollar 2.163174331588261 ns/iter 1.9093950762244953 ns/iter 1.13
Regex_Caret_Period_Asterisk_Dollar 1.6913720764057214 ns/iter 1.586896044145313 ns/iter 1.07
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.7288453014893306 ns/iter 1.6516973207305297 ns/iter 1.05
Regex_Caret_X_Hyphen 6.348962269413546 ns/iter 5.679159008464676 ns/iter 1.12
Regex_Period_Md_Dollar 16.782950389565734 ns/iter 15.939873474478325 ns/iter 1.05
Regex_Caret_Slash_Period_Asterisk 4.425344287111415 ns/iter 4.360997785339078 ns/iter 1.01
Regex_Caret_Period_Range_Dollar 2.1364484180492105 ns/iter 1.9090964352759854 ns/iter 1.12
Regex_Nested_Backtrack 31.763293791477636 ns/iter 24.5538229340939 ns/iter 1.29
JSON_Array_Of_Objects_Unique 377.82132235452286 ns/iter 322.22045029097495 ns/iter 1.17
JSON_Parse_1 4315.872853596602 ns/iter 6156.049815481139 ns/iter 0.70
JSON_Parse_Real 5684.328027472948 ns/iter 6158.490628300231 ns/iter 0.92
JSON_Parse_Decimal 6705.180767362172 ns/iter 6931.157213525293 ns/iter 0.97
JSON_Parse_Schema_ISO_Language 2631336.1494660666 ns/iter 3538553.99489812 ns/iter 0.74
JSON_Parse_Integer 3946.9176145808256 ns/iter 4437.4449912488135 ns/iter 0.89
JSON_Parse_String_NonSSO_Plain 4251.162330533578 ns/iter 6982.095456762877 ns/iter 0.61
JSON_Parse_String_SSO_Plain 2073.591832130512 ns/iter 2622.438869165135 ns/iter 0.79
JSON_Parse_String_Escape_Heavy 23091.212716071648 ns/iter 19744.94915588758 ns/iter 1.17
JSON_Parse_Object_Short_Keys 6633.1783971626155 ns/iter 8097.537101904416 ns/iter 0.82
JSON_Parse_Object_Scalar_Properties 3750.1432128926594 ns/iter 4054.8707560858174 ns/iter 0.92
JSON_Parse_Object_Array_Properties 4574.339055953281 ns/iter 6547.811849042971 ns/iter 0.70
JSON_Parse_Object_Object_Properties 5232.681249999587 ns/iter 6825.085977069956 ns/iter 0.77
JSON_Parse_Nested_Containers 34981.87545412579 ns/iter 56378.02809838459 ns/iter 0.62
JSON_From_String_Copy 28.551590338940787 ns/iter 22.78463143867221 ns/iter 1.25
JSON_From_String_Temporary 25.040438697133652 ns/iter 17.654123993776572 ns/iter 1.42
JSON_Number_To_Double 41.74930149603968 ns/iter 31.18650231290841 ns/iter 1.34
JSON_Object_At_Last_Key/8 4.921471996868756 ns/iter 4.226176196324249 ns/iter 1.16
JSON_Object_At_Last_Key/32 13.08700125843892 ns/iter 11.333415369022626 ns/iter 1.15
JSON_Object_At_Last_Key/128 59.440455269348405 ns/iter 50.73466680527783 ns/iter 1.17
JSON_Object_At_Last_Key/512 193.11806333872585 ns/iter 175.13346788331367 ns/iter 1.10
JSON_Fast_Hash_Helm_Chart_Lock 63.584270076645886 ns/iter 57.71648910284578 ns/iter 1.10
JSON_Equality_Helm_Chart_Lock 182.7786679739156 ns/iter 126.4558856252595 ns/iter 1.45
JSON_Divisible_By_Decimal 217.13046170653752 ns/iter 162.27767289118805 ns/iter 1.34
JSON_String_Equal/10 7.4497740580500675 ns/iter 6.297786874225496 ns/iter 1.18
JSON_String_Equal/100 6.940325997557284 ns/iter 6.014959865363058 ns/iter 1.15
JSON_String_Equal_Small_By_Perfect_Hash/10 0.3579277221607582 ns/iter 0.314193706551447 ns/iter 1.14
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.3380399350816443 ns/iter 2.976909474709722 ns/iter 1.12
JSON_String_Fast_Hash/10 2.4204171824488143 ns/iter 2.2056404763625004 ns/iter 1.10
JSON_String_Fast_Hash/100 2.0786497656688807 ns/iter 2.001585636904189 ns/iter 1.04
JSON_String_Key_Hash/10 1.7124767337471436 ns/iter 1.5811359473788797 ns/iter 1.08
JSON_String_Key_Hash/100 2.1651863484003417 ns/iter 1.898773098915101 ns/iter 1.14
JSON_Object_Defines_Miss_Same_Length 2.7053099618654755 ns/iter 2.5725583722442 ns/iter 1.05
JSON_Object_Defines_Miss_Too_Small 3.096605720121162 ns/iter 2.539952940608776 ns/iter 1.22
JSON_Object_Defines_Miss_Too_Large 2.702668613110064 ns/iter 2.5166450628484496 ns/iter 1.07
Pointer_Object_Traverse 19.799626464429632 ns/iter 22.080763523108637 ns/iter 0.90
Pointer_Object_Try_Traverse 25.841903391134025 ns/iter 20.375304980683534 ns/iter 1.27
Pointer_Push_Back_Pointer_To_Weak_Pointer 177.07495079556682 ns/iter 148.40424619099477 ns/iter 1.19
Pointer_Walker_Schema_ISO_Language 2563414.698181739 ns/iter 2370729.4463086007 ns/iter 1.08
Pointer_Maybe_Tracked_Deeply_Nested/0 844144.4251206865 ns/iter 1121438.1028938275 ns/iter 0.75
Pointer_Maybe_Tracked_Deeply_Nested/1 1024376.8737300026 ns/iter 948067.2101063039 ns/iter 1.08
Pointer_Position_Tracker_Get_Deeply_Nested 331.0091475251287 ns/iter 315.2386804413858 ns/iter 1.05
JSONPath_Descendant_Filter_Nested 1321.1460697413956 ns/iter 1209.6421889251437 ns/iter 1.09
URITemplateRouter_Create 23257.505417570075 ns/iter 21506.248846367384 ns/iter 1.08
URITemplateRouter_Match 177.46777108784605 ns/iter 167.64014951871476 ns/iter 1.06
URITemplateRouter_Match_BasePath 203.1643477472247 ns/iter 184.53712795865934 ns/iter 1.10
URITemplateRouterView_Restore 10212.552982415922 ns/iter 9307.559986149456 ns/iter 1.10
URITemplateRouterView_Match 135.75122889801958 ns/iter 125.45652864345041 ns/iter 1.08
URITemplateRouterView_Match_BasePath 153.7043796228735 ns/iter 141.50245436898317 ns/iter 1.09
URITemplateRouterView_Arguments 551.8792351862802 ns/iter 510.2727500474957 ns/iter 1.08
JSONL_Parse_Large 8290066.265059856 ns/iter 9462221.45205411 ns/iter 0.88
JSONL_Parse_Large_GZIP 9188239.181818454 ns/iter 11180176.587301848 ns/iter 0.82
JSONLD_Catalog_Annotation_List_Populate 934707.6540027214 ns/iter 920844.482119183 ns/iter 1.02
JSONLD_Catalog_Materialize 2779178.8320000707 ns/iter 4325065.633986395 ns/iter 0.64
HTML_Build_Table_100000 36368480.26315564 ns/iter 38344289.47368451 ns/iter 0.95
HTML_Render_Table_100000 1507465.1864036345 ns/iter 1602255.4704594864 ns/iter 0.94
GZIP_Compress_ISO_Language_Set_3_Locations 28000342.961538885 ns/iter 29441768.360002242 ns/iter 0.95
GZIP_Decompress_ISO_Language_Set_3_Locations 3233949.6811594423 ns/iter 3292169.724770889 ns/iter 0.98
GZIP_Compress_ISO_Language_Set_3_Schema 1526363.5538461201 ns/iter 1422369.349576393 ns/iter 1.07
GZIP_Decompress_ISO_Language_Set_3_Schema 275971.36352894356 ns/iter 253760.41642653887 ns/iter 1.09
JOSE_VerifySignature_RS256 21848.467756500257 ns/iter 22000.655068080032 ns/iter 0.99
JOSE_VerifySignature_ES512 982455.5487466126 ns/iter 912778.0900663484 ns/iter 1.08

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: 4a51d3d Previous: 38f833c Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.520036845458868 ns/iter 2.534254211784145 ns/iter 0.99
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.8029971233259348 ns/iter 2.802449953854108 ns/iter 1.00
Regex_Period_Asterisk 2.8030704900507537 ns/iter 2.799695656172019 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.49205501927917 ns/iter 2.4892076161014844 ns/iter 1.00
Regex_Period_Plus 3.1152424651883934 ns/iter 3.1342009631722227 ns/iter 0.99
Regex_Period 3.4256901451156474 ns/iter 3.426181062801845 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 3.7441187295102325 ns/iter 3.4266148639070875 ns/iter 1.09
Regex_Caret_Group_Period_Plus_Group_Dollar 3.1137320903452075 ns/iter 3.1136876682819707 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 3.73455991092528 ns/iter 3.7334838243372324 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 4.048911052580747 ns/iter 4.060613493466596 ns/iter 1.00
Regex_Caret_X_Hyphen 7.5054372626520784 ns/iter 7.4756647383212345 ns/iter 1.00
Regex_Period_Md_Dollar 27.555401694316984 ns/iter 27.53481054771673 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 6.538141968048892 ns/iter 6.538964200457486 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 4.670639846063091 ns/iter 4.6678598195636045 ns/iter 1.00
Regex_Nested_Backtrack 46.86981371391078 ns/iter 46.98357212607578 ns/iter 1.00
JSON_Array_Of_Objects_Unique 416.4757309392449 ns/iter 415.987768144205 ns/iter 1.00
JSON_Parse_1 4912.752470131797 ns/iter 4827.0578727798475 ns/iter 1.02
JSON_Parse_Real 5463.865448388431 ns/iter 5372.297914999157 ns/iter 1.02
JSON_Parse_Decimal 7972.525324771326 ns/iter 7819.873492354764 ns/iter 1.02
JSON_Parse_Schema_ISO_Language 3540681.702019691 ns/iter 3527455.272727122 ns/iter 1.00
JSON_Parse_Integer 3910.5891304594047 ns/iter 3738.952354537637 ns/iter 1.05
JSON_Parse_String_NonSSO_Plain 5079.346886571522 ns/iter 5058.728214560408 ns/iter 1.00
JSON_Parse_String_SSO_Plain 2801.7143656608628 ns/iter 2776.556178793339 ns/iter 1.01
JSON_Parse_String_Escape_Heavy 14519.049928376333 ns/iter 14615.73749896149 ns/iter 0.99
JSON_Parse_Object_Short_Keys 10502.886548566205 ns/iter 10436.20681646674 ns/iter 1.01
JSON_Parse_Object_Scalar_Properties 4059.6012904273607 ns/iter 3955.7478992542765 ns/iter 1.03
JSON_Parse_Object_Array_Properties 5993.26617751452 ns/iter 5631.743596750743 ns/iter 1.06
JSON_Parse_Object_Object_Properties 5720.785965601698 ns/iter 5735.253325701674 ns/iter 1.00
JSON_Parse_Nested_Containers 46255.444052452236 ns/iter 45237.57677878532 ns/iter 1.02
JSON_From_String_Copy 21.184586292347717 ns/iter 21.21145347730009 ns/iter 1.00
JSON_From_String_Temporary 18.40389503478867 ns/iter 17.45884493977339 ns/iter 1.05
JSON_Number_To_Double 23.083237943923237 ns/iter 23.484939789416973 ns/iter 0.98
JSON_Object_At_Last_Key/8 3.839658744492445 ns/iter 3.8417167923712165 ns/iter 1.00
JSON_Object_At_Last_Key/32 12.224414667143366 ns/iter 12.191293550877287 ns/iter 1.00
JSON_Object_At_Last_Key/128 48.34970773347973 ns/iter 49.73033534757311 ns/iter 0.97
JSON_Object_At_Last_Key/512 399.5484728938504 ns/iter 400.34717354216434 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 66.15935407405622 ns/iter 60.07002297476437 ns/iter 1.10
JSON_Equality_Helm_Chart_Lock 172.4822261397039 ns/iter 175.26659166793885 ns/iter 0.98
JSON_Divisible_By_Decimal 251.83996570864454 ns/iter 251.54398028294534 ns/iter 1.00
JSON_String_Equal/10 5.968666767040168 ns/iter 5.9216606043286175 ns/iter 1.01
JSON_String_Equal/100 6.54995107790834 ns/iter 6.549646024689716 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9441482962569075 ns/iter 0.9399859962989943 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 10.689421465112048 ns/iter 10.636647545369838 ns/iter 1.00
JSON_String_Fast_Hash/10 2.80335325552026 ns/iter 2.8038775766903794 ns/iter 1.00
JSON_String_Fast_Hash/100 2.8023763361358847 ns/iter 2.8021762141878965 ns/iter 1.00
JSON_String_Key_Hash/10 2.1828958874901336 ns/iter 2.1829614286534986 ns/iter 1.00
JSON_String_Key_Hash/100 6.540688852298149 ns/iter 6.537107220968381 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.0935951365328074 ns/iter 3.1217085435877867 ns/iter 0.99
JSON_Object_Defines_Miss_Too_Small 3.4249803595229986 ns/iter 3.487663079231422 ns/iter 0.98
JSON_Object_Defines_Miss_Too_Large 2.6805524894336314 ns/iter 2.6151025870156634 ns/iter 1.03
Pointer_Object_Traverse 28.621220244829747 ns/iter 28.539720267632266 ns/iter 1.00
Pointer_Object_Try_Traverse 31.373494434145734 ns/iter 31.338125331172822 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 170.5545813189565 ns/iter 161.26375811377744 ns/iter 1.06
Pointer_Walker_Schema_ISO_Language 2541675.660584249 ns/iter 2553179.0109490585 ns/iter 1.00
Pointer_Maybe_Tracked_Deeply_Nested/0 1262448.9415928721 ns/iter 1200210.5692039342 ns/iter 1.05
Pointer_Maybe_Tracked_Deeply_Nested/1 1603970.1070614606 ns/iter 1584740.4988660591 ns/iter 1.01
Pointer_Position_Tracker_Get_Deeply_Nested 697.0923803621589 ns/iter 673.2063530945808 ns/iter 1.04
JSONPath_Descendant_Filter_Nested 1565.5052037057787 ns/iter 1570.2812554549623 ns/iter 1.00
URITemplateRouter_Create 31504.31587671322 ns/iter 31710.00961755805 ns/iter 0.99
URITemplateRouter_Match 179.17650355925966 ns/iter 177.56141193037112 ns/iter 1.01
URITemplateRouter_Match_BasePath 209.87047535219727 ns/iter 209.47455312523135 ns/iter 1.00
URITemplateRouterView_Restore 8371.197781298919 ns/iter 8558.404830566447 ns/iter 0.98
URITemplateRouterView_Match 161.9360488958785 ns/iter 161.80647536860178 ns/iter 1.00
URITemplateRouterView_Match_BasePath 191.72313598078586 ns/iter 190.73423747640504 ns/iter 1.01
URITemplateRouterView_Arguments 441.37912396272446 ns/iter 435.596553481022 ns/iter 1.01
JSONL_Parse_Large 9647993.287670296 ns/iter 9635422.041665403 ns/iter 1.00
JSONL_Parse_Large_GZIP 11203106.387096884 ns/iter 11188908.571428992 ns/iter 1.00
JSONLD_Catalog_Annotation_List_Populate 1315824.6885555123 ns/iter 1317669.561797728 ns/iter 1.00
JSONLD_Catalog_Materialize 4415673.3544301875 ns/iter 4356765.262500062 ns/iter 1.01
HTML_Build_Table_100000 62996987.90909051 ns/iter 64762150.72726435 ns/iter 0.97
HTML_Render_Table_100000 5139189.377778335 ns/iter 5430599.116279641 ns/iter 0.95
GZIP_Compress_ISO_Language_Set_3_Locations 32417397.590909954 ns/iter 32657186.476193428 ns/iter 0.99
GZIP_Decompress_ISO_Language_Set_3_Locations 4023929.137930678 ns/iter 4149875.1497007753 ns/iter 0.97
GZIP_Compress_ISO_Language_Set_3_Schema 1859038.9973189482 ns/iter 1864623.1653334931 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 355696.8358740102 ns/iter 356015.4397560729 ns/iter 1.00
JOSE_VerifySignature_RS256 58179.119565214125 ns/iter 58163.28353988487 ns/iter 1.00
JOSE_VerifySignature_ES512 2414861.903448268 ns/iter 2422193.3425604054 ns/iter 1.00

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: 4a51d3d Previous: 38f833c Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.596512857142638 ns/iter 5.345906999998533 ns/iter 0.49
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.666138571428941 ns/iter 5.034488999999667 ns/iter 0.53
Regex_Period_Asterisk 2.5777749999999093 ns/iter 5.0385529999994105 ns/iter 0.51
Regex_Group_Period_Asterisk_Group 2.576864285714464 ns/iter 5.106751000000713 ns/iter 0.50
Regex_Period_Plus 2.5924198631776556 ns/iter 4.7929620642697355 ns/iter 0.54
Regex_Period 2.6081396428578176 ns/iter 5.051966999999422 ns/iter 0.52
Regex_Caret_Period_Plus_Dollar 2.5487189285716534 ns/iter 4.889790536805628 ns/iter 0.52
Regex_Caret_Group_Period_Plus_Group_Dollar 2.6735810714285435 ns/iter 5.161151000002064 ns/iter 0.52
Regex_Caret_Period_Asterisk_Dollar 2.57409892857124 ns/iter 5.4979260000004615 ns/iter 0.47
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.587430734296877 ns/iter 5.02574500000037 ns/iter 0.51
Regex_Caret_X_Hyphen 6.214716964285977 ns/iter 8.840679871245607 ns/iter 0.70
Regex_Period_Md_Dollar 26.58991785714144 ns/iter 44.82535138549035 ns/iter 0.59
Regex_Caret_Slash_Period_Asterisk 5.576008999998976 ns/iter 8.302246651786964 ns/iter 0.67
Regex_Caret_Period_Range_Dollar 3.231986723799604 ns/iter 6.079658035714276 ns/iter 0.53
Regex_Nested_Backtrack 34.3717644530592 ns/iter 57.11825892857649 ns/iter 0.60
JSON_Array_Of_Objects_Unique 440.81043326498735 ns/iter 601.9790178571936 ns/iter 0.73
JSON_Parse_1 6941.467857142162 ns/iter 8830.753880563188 ns/iter 0.79
JSON_Parse_Real 10585.599999998862 ns/iter 16053.06473214187 ns/iter 0.66
JSON_Parse_Decimal 8246.111401286955 ns/iter 12112.344642856344 ns/iter 0.68
JSON_Parse_Schema_ISO_Language 7410769.642855744 ns/iter 7630845.55555401 ns/iter 0.97
JSON_Parse_Integer 4143.153124999799 ns/iter 6382.276785714679 ns/iter 0.65
JSON_Parse_String_NonSSO_Plain 5718.817857141646 ns/iter 8102.3008825856905 ns/iter 0.71
JSON_Parse_String_SSO_Plain 2543.2403571422974 ns/iter 3653.982123697222 ns/iter 0.70
JSON_Parse_String_Escape_Heavy 20313.139109742428 ns/iter 21883.21250000058 ns/iter 0.93
JSON_Parse_Object_Short_Keys 9109.141923472456 ns/iter 13372.391071426038 ns/iter 0.68
JSON_Parse_Object_Scalar_Properties 4722.005657579813 ns/iter 6979.8482142857665 ns/iter 0.68
JSON_Parse_Object_Array_Properties 8162.614955356925 ns/iter 11524.525000002228 ns/iter 0.71
JSON_Parse_Object_Object_Properties 8299.57946616081 ns/iter 11860.07499999775 ns/iter 0.70
JSON_Parse_Nested_Containers 59116.25000000039 ns/iter 79685.12276786806 ns/iter 0.74
JSON_From_String_Copy 44.897974999997814 ns/iter 65.40401785713357 ns/iter 0.69
JSON_From_String_Temporary 51.20205357142383 ns/iter 59.024705357160194 ns/iter 0.87
JSON_Number_To_Double 79.81937500000566 ns/iter 122.23012499999543 ns/iter 0.65
JSON_Object_At_Last_Key/8 6.6177109375001715 ns/iter 7.297052678570789 ns/iter 0.91
JSON_Object_At_Last_Key/32 18.33859340398143 ns/iter 23.57100357142729 ns/iter 0.78
JSON_Object_At_Last_Key/128 77.39854464286314 ns/iter 91.19729057155394 ns/iter 0.85
JSON_Object_At_Last_Key/512 259.8706633870992 ns/iter 429.9656370551183 ns/iter 0.60
JSON_Fast_Hash_Helm_Chart_Lock 66.54556250000252 ns/iter 103.5465489488321 ns/iter 0.64
JSON_Equality_Helm_Chart_Lock 208.95293749994437 ns/iter 212.97034375002966 ns/iter 0.98
JSON_Divisible_By_Decimal 229.9727756726466 ns/iter 299.25607374376665 ns/iter 0.77
JSON_String_Equal/10 9.21699638742595 ns/iter 10.408448437498663 ns/iter 0.89
JSON_String_Equal/100 11.554723437498637 ns/iter 11.779634374999404 ns/iter 0.98
JSON_String_Equal_Small_By_Perfect_Hash/10 1.329246428571602 ns/iter 2.522909999999813 ns/iter 0.53
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 8.869955357143157 ns/iter 14.239917410710593 ns/iter 0.62
JSON_String_Fast_Hash/10 2.962340464782996 ns/iter 6.638066964285372 ns/iter 0.45
JSON_String_Fast_Hash/100 2.904232096918241 ns/iter 6.657862500000126 ns/iter 0.44
JSON_String_Key_Hash/10 2.6122864039175133 ns/iter 5.3687437500014665 ns/iter 0.49
JSON_String_Key_Hash/100 7.356786830359547 ns/iter 11.962307142860189 ns/iter 0.61
JSON_Object_Defines_Miss_Same_Length 4.036301339285231 ns/iter 3.8267879464282117 ns/iter 1.05
JSON_Object_Defines_Miss_Too_Small 3.417182404612444 ns/iter 4.158180801714817 ns/iter 0.82
JSON_Object_Defines_Miss_Too_Large 3.5057107973108548 ns/iter 3.815518415178433 ns/iter 0.92
Pointer_Object_Traverse 35.81114351019708 ns/iter 66.98150892857159 ns/iter 0.53
Pointer_Object_Try_Traverse 38.30441181599771 ns/iter 71.39909821426775 ns/iter 0.54
Pointer_Push_Back_Pointer_To_Weak_Pointer 135.0780714286007 ns/iter 203.68016054993714 ns/iter 0.66
Pointer_Walker_Schema_ISO_Language 9480458.666666891 ns/iter 10719160.937501471 ns/iter 0.88
Pointer_Maybe_Tracked_Deeply_Nested/0 1998547.857142187 ns/iter 2355280.321284862 ns/iter 0.85
Pointer_Maybe_Tracked_Deeply_Nested/1 3450657.843137494 ns/iter 3777295.897436535 ns/iter 0.91
Pointer_Position_Tracker_Get_Deeply_Nested 480.09500558039116 ns/iter 540.1431361249197 ns/iter 0.89
JSONPath_Descendant_Filter_Nested 1539.6707589283258 ns/iter 2358.1764975713277 ns/iter 0.65
URITemplateRouter_Create 32176.522294251834 ns/iter 42227.51160128432 ns/iter 0.76
URITemplateRouter_Match 221.8744687499452 ns/iter 233.22553200606532 ns/iter 0.95
URITemplateRouter_Match_BasePath 258.0757972355014 ns/iter 264.93700602958296 ns/iter 0.97
URITemplateRouterView_Restore 18291.982142853514 ns/iter 33166.514437247504 ns/iter 0.55
URITemplateRouterView_Match 158.60203125000234 ns/iter 183.0633381515474 ns/iter 0.87
URITemplateRouterView_Match_BasePath 179.49681959792252 ns/iter 209.17405316185454 ns/iter 0.86
URITemplateRouterView_Arguments 420.7652937158322 ns/iter 544.3963392857703 ns/iter 0.77
JSONL_Parse_Large 22876565.62500473 ns/iter 32805280.95237536 ns/iter 0.70
JSONL_Parse_Large_GZIP 22709843.33332914 ns/iter 33372780.9523853 ns/iter 0.68
JSONLD_Catalog_Annotation_List_Populate 2668366.6666663224 ns/iter 3059383.8983059037 ns/iter 0.87
JSONLD_Catalog_Materialize 6187903.571429842 ns/iter 8441981.111109776 ns/iter 0.73
HTML_Build_Table_100000 92723999.99999185 ns/iter 90954044.44446509 ns/iter 1.02
HTML_Render_Table_100000 11678349.99999684 ns/iter 7992163.333334348 ns/iter 1.46
GZIP_Compress_ISO_Language_Set_3_Locations 28043336.000000633 ns/iter 35454368.4210464 ns/iter 0.79
GZIP_Decompress_ISO_Language_Set_3_Locations 11289379.687497104 ns/iter 9873813.3333336 ns/iter 1.14
GZIP_Compress_ISO_Language_Set_3_Schema 1796958.445039984 ns/iter 2098101.5625004317 ns/iter 0.86
GZIP_Decompress_ISO_Language_Set_3_Schema 654782.7008928562 ns/iter 611394.9000000503 ns/iter 1.07
JOSE_VerifySignature_RS256 17170.491320254623 ns/iter 21228.017544447604 ns/iter 0.81
JOSE_VerifySignature_ES512 916560.2409636024 ns/iter 1362861.646586121 ns/iter 0.67

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

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

No issues found across 6 files

Re-trigger cubic

@jviotti
jviotti merged commit 9642652 into main Aug 9, 2026
13 checks passed
@jviotti
jviotti deleted the json-initialiser-fix branch August 9, 2026 21:18
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