Skip to content

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Jan 5, 2026

Signed-off-by: Juan Cruz Viotti [email protected]

@jviotti jviotti force-pushed the jsonschema-string-views branch 2 times, most recently from 63cb290 to f7c96a1 Compare January 5, 2026 19:57
@jviotti jviotti force-pushed the jsonschema-string-views branch from f7c96a1 to d138224 Compare January 5, 2026 21:27
Copy link

@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: c7e6cfb Previous: 171825a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 3.1140458584950035 ns/iter 3.1146595380596787 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.1095125594479303 ns/iter 3.10683144929271 ns/iter 1.00
Regex_Period_Asterisk 3.1105804370261323 ns/iter 3.1073151638949175 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 3.1085443011109737 ns/iter 3.1080518203840266 ns/iter 1.00
Regex_Period_Plus 3.0212030772458855 ns/iter 3.1165952749491237 ns/iter 0.97
Regex_Period 3.107264561875871 ns/iter 3.10987915369895 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 2.9879836195286402 ns/iter 3.109626512259987 ns/iter 0.96
Regex_Caret_Group_Period_Plus_Group_Dollar 2.9858113693474206 ns/iter 3.1113537152519704 ns/iter 0.96
Regex_Caret_Period_Asterisk_Dollar 3.1085034880222495 ns/iter 3.4204762450295565 ns/iter 0.91
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.4209019866753185 ns/iter 3.7377499654963593 ns/iter 0.92
Regex_Caret_X_Hyphen 10.261401716346878 ns/iter 10.273313045409846 ns/iter 1.00
Regex_Period_Md_Dollar 27.657475023256023 ns/iter 27.19662265501167 ns/iter 1.02
Regex_Caret_Slash_Period_Asterisk 6.217096370973161 ns/iter 7.466911828091827 ns/iter 0.83
Regex_Caret_Period_Range_Dollar 4.040982022687406 ns/iter 3.3540566852332647 ns/iter 1.20
Regex_Nested_Backtrack 49.199093598659 ns/iter 47.570781504716635 ns/iter 1.03
JSON_Array_Of_Objects_Unique 415.2150935776687 ns/iter 436.7112019473954 ns/iter 0.95
JSON_Parse_1 30785.290028092764 ns/iter 29536.436550991566 ns/iter 1.04
JSON_Parse_Real 38640.48005769546 ns/iter 38281.34524004799 ns/iter 1.01
JSON_Parse_Decimal 130756.25574014863 ns/iter 130891.39182600736 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 55.570683119332436 ns/iter 62.20754590819734 ns/iter 0.89
JSON_Equality_Helm_Chart_Lock 161.6724087328461 ns/iter 159.8726542317001 ns/iter 1.01
JSON_String_Equal/10 7.159984372392584 ns/iter 6.689211036409265 ns/iter 1.07
JSON_String_Equal/100 7.780985166443577 ns/iter 7.172788009997359 ns/iter 1.08
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9382540425711502 ns/iter 0.9379432116722409 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 10.263186357458908 ns/iter 10.2589356936761 ns/iter 1.00
JSON_String_Fast_Hash/10 2.175475882020259 ns/iter 2.4896542690043697 ns/iter 0.87
JSON_String_Fast_Hash/100 2.1758982081478075 ns/iter 2.4887479191328947 ns/iter 0.87
JSON_String_Key_Hash/10 2.4896253640910393 ns/iter 2.490408331335106 ns/iter 1.00
JSON_String_Key_Hash/100 6.531233362400284 ns/iter 6.530539825961419 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.734949909181467 ns/iter 3.737635012672421 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.7554077618256203 ns/iter 3.7394361065123753 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.7332612313972433 ns/iter 3.7523993695267737 ns/iter 0.99
Pointer_Object_Traverse 44.086859939541874 ns/iter 44.81877655500237 ns/iter 0.98
Pointer_Object_Try_Traverse 53.22854581196132 ns/iter 53.818386139536 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 355.48677306758924 ns/iter 344.0204573662431 ns/iter 1.03
Schema_Frame_WoT_References 7299543.752576506 ns/iter 8343129.452382095 ns/iter 0.87
Schema_Frame_OMC_References 33908115.95238033 ns/iter 40743536.923086 ns/iter 0.83
Schema_Frame_OMC_Locations 31300973.13635877 ns/iter 37697049.8333296 ns/iter 0.83
Schema_Frame_ISO_Language_Locations 158332714.5000055 ns/iter 172519281.5000014 ns/iter 0.92
Schema_Iterator_ISO_Language 3154584.274774983 ns/iter 3696780.125654386 ns/iter 0.85
Schema_PointerWalker_ISO_Language 4685363.833333819 ns/iter 5059374.079999088 ns/iter 0.93
Schema_Frame_ISO_Language_Locations_To_JSON 153924857.800007 ns/iter 164825326.00002742 ns/iter 0.93
Schema_Tracker_ISO_Language 44306192.86666418 ns/iter 51910682.61538371 ns/iter 0.85
Schema_Tracker_ISO_Language_To_JSON 20956451.696971465 ns/iter 28389928.99999463 ns/iter 0.74
Schema_Format_ISO_Language_To_JSON 170977582.499944 ns/iter 181762230.99999332 ns/iter 0.94
Schema_Bundle_Meta_2020_12 2156525.058279229 ns/iter 2216930.7301694406 ns/iter 0.97
Alterschema_Check_Readibility_ISO_Language_Set_3 284405908.6666751 ns/iter 303166223.499943 ns/iter 0.94
Alterschema_Check_Readibility_OMC 39708281.27777774 ns/iter 48222848.133339845 ns/iter 0.82
URITemplateRouter_Create 16396.798992575143 ns/iter 16945.67213790143 ns/iter 0.97
URITemplateRouter_Match 177.55822300372648 ns/iter 172.20966912416102 ns/iter 1.03
URITemplateRouterView_Restore 8136.631115698852 ns/iter 8390.321884517158 ns/iter 0.97
URITemplateRouterView_Match 118.07347133843031 ns/iter 131.51289853948154 ns/iter 0.90

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

Copy link

@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: c7e6cfb Previous: 171825a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 4.423121874999936 ns/iter 3.0916839285706845 ns/iter 1.43
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 4.395120882064981 ns/iter 2.8178811148133347 ns/iter 1.56
Regex_Period_Asterisk 5.027148907372522 ns/iter 3.2853754738831618 ns/iter 1.53
Regex_Group_Period_Asterisk_Group 4.7037529122845525 ns/iter 3.0178772321432588 ns/iter 1.56
Regex_Period_Plus 4.745436407308957 ns/iter 3.58543662386161 ns/iter 1.32
Regex_Period 4.7168511265999316 ns/iter 3.663755730881867 ns/iter 1.29
Regex_Caret_Period_Plus_Dollar 4.400697556158702 ns/iter 3.4106790178571242 ns/iter 1.29
Regex_Caret_Group_Period_Plus_Group_Dollar 4.083577998363561 ns/iter 3.023210442379447 ns/iter 1.35
Regex_Caret_Period_Asterisk_Dollar 4.815585278606536 ns/iter 2.9749037906591784 ns/iter 1.62
Regex_Caret_Group_Period_Asterisk_Group_Dollar 4.397886250000482 ns/iter 2.9064219380720817 ns/iter 1.51
Regex_Caret_X_Hyphen 7.853541294642647 ns/iter 6.154921428570707 ns/iter 1.28
Regex_Period_Md_Dollar 37.16971448323371 ns/iter 30.375825474622406 ns/iter 1.22
Regex_Caret_Slash_Period_Asterisk 7.832448660714927 ns/iter 5.86458035714291 ns/iter 1.34
Regex_Caret_Period_Range_Dollar 4.72569498839681 ns/iter 3.406977192823051 ns/iter 1.39
Regex_Nested_Backtrack 112.28982812500732 ns/iter 91.82520125781826 ns/iter 1.22
JSON_Array_Of_Objects_Unique 458.2755624999635 ns/iter 395.1585937499606 ns/iter 1.16
JSON_Parse_1 72853.41517856585 ns/iter 79278.57142855694 ns/iter 0.92
JSON_Parse_Real 91833.27976430005 ns/iter 98508.9687500107 ns/iter 0.93
JSON_Parse_Decimal 350906.19419645256 ns/iter 319345.0892857592 ns/iter 1.10
JSON_Fast_Hash_Helm_Chart_Lock 51.65386999999555 ns/iter 43.05021479419255 ns/iter 1.20
JSON_Equality_Helm_Chart_Lock 504.25887566547044 ns/iter 239.67632142850042 ns/iter 2.10
JSON_String_Equal/10 17.00273917185641 ns/iter 10.613033482143358 ns/iter 1.60
JSON_String_Equal/100 19.193588041112832 ns/iter 13.888546813001438 ns/iter 1.38
JSON_String_Equal_Small_By_Perfect_Hash/10 2.4078157142858863 ns/iter 1.80345624999997 ns/iter 1.34
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 12.859266071428367 ns/iter 9.650067814063846 ns/iter 1.33
JSON_String_Fast_Hash/10 3.159786098687571 ns/iter 2.145243749999537 ns/iter 1.47
JSON_String_Fast_Hash/100 3.25804406759077 ns/iter 2.1494252208156968 ns/iter 1.52
JSON_String_Key_Hash/10 3.7766373146846224 ns/iter 2.7075194172251478 ns/iter 1.39
JSON_String_Key_Hash/100 13.74048476008707 ns/iter 14.202024043742245 ns/iter 0.97
JSON_Object_Defines_Miss_Same_Length 4.709620323012652 ns/iter 5.101982999999564 ns/iter 0.92
JSON_Object_Defines_Miss_Too_Small 4.047141957058736 ns/iter 4.274937118627025 ns/iter 0.95
JSON_Object_Defines_Miss_Too_Large 4.7420216623704965 ns/iter 5.026878999999553 ns/iter 0.94
Pointer_Object_Traverse 51.35319642857691 ns/iter 45.88793405998597 ns/iter 1.12
Pointer_Object_Try_Traverse 66.72541071429197 ns/iter 63.35729464284766 ns/iter 1.05
Pointer_Push_Back_Pointer_To_Weak_Pointer 147.6147991071335 ns/iter 192.4604100411304 ns/iter 0.77
Schema_Frame_WoT_References 16561004.878049172 ns/iter 20364973.52941403 ns/iter 0.81
Schema_Frame_OMC_References 79844666.66667028 ns/iter 94846357.14287443 ns/iter 0.84
Schema_Frame_OMC_Locations 73741466.66666093 ns/iter 95561042.85716823 ns/iter 0.77
Schema_Frame_ISO_Language_Locations 299217399.99997497 ns/iter 377264999.9999658 ns/iter 0.79
Schema_Iterator_ISO_Language 6684307.777777577 ns/iter 11694039.062497552 ns/iter 0.57
Schema_PointerWalker_ISO_Language 12288864.285713837 ns/iter 15169842.222222643 ns/iter 0.81
Schema_Frame_ISO_Language_Locations_To_JSON 229677299.9999727 ns/iter 254478533.3333645 ns/iter 0.90
Schema_Tracker_ISO_Language 103188433.3333437 ns/iter 117891316.66663857 ns/iter 0.88
Schema_Tracker_ISO_Language_To_JSON 55364390.909093425 ns/iter 60353472.72729103 ns/iter 0.92
Schema_Format_ISO_Language_To_JSON 302761399.99995166 ns/iter 358172299.99997836 ns/iter 0.85
Schema_Bundle_Meta_2020_12 3789805.641021979 ns/iter 3998655.8139532446 ns/iter 0.95
Alterschema_Check_Readibility_ISO_Language_Set_3 435310300.00002605 ns/iter 504099399.9998591 ns/iter 0.86
Alterschema_Check_Readibility_OMC 86360914.2857058 ns/iter 101317571.42858078 ns/iter 0.85
URITemplateRouter_Create 21822.58750000088 ns/iter 21903.671875001863 ns/iter 1.00
URITemplateRouter_Match 209.11416030741134 ns/iter 236.2568374713001 ns/iter 0.89
URITemplateRouterView_Restore 36522.603478178455 ns/iter 29321.064285714525 ns/iter 1.25
URITemplateRouterView_Match 156.74059791337018 ns/iter 150.84053571428058 ns/iter 1.04

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

Copy link

@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: c7e6cfb Previous: 171825a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.040945690821719 ns/iter 2.6745175178924616 ns/iter 0.76
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.9768395259534353 ns/iter 2.866191442416914 ns/iter 0.69
Regex_Period_Asterisk 1.9023078913476048 ns/iter 2.7370447756280636 ns/iter 0.70
Regex_Group_Period_Asterisk_Group 1.8138614359458525 ns/iter 2.8932896315157755 ns/iter 0.63
Regex_Period_Plus 2.173728720591439 ns/iter 3.335954873929167 ns/iter 0.65
Regex_Period 2.148990561147443 ns/iter 3.1976178116870444 ns/iter 0.67
Regex_Caret_Period_Plus_Dollar 2.1338236738634038 ns/iter 3.222529504751676 ns/iter 0.66
Regex_Caret_Group_Period_Plus_Group_Dollar 2.07521582198646 ns/iter 3.3578239332059243 ns/iter 0.62
Regex_Caret_Period_Asterisk_Dollar 1.804456671211895 ns/iter 2.546124099884244 ns/iter 0.71
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.1891773732923916 ns/iter 2.3287186214390703 ns/iter 0.94
Regex_Caret_X_Hyphen 8.053932216595966 ns/iter 8.702648022552513 ns/iter 0.93
Regex_Period_Md_Dollar 28.990753620529212 ns/iter 27.840204776311182 ns/iter 1.04
Regex_Caret_Slash_Period_Asterisk 7.282255244847956 ns/iter 6.53517917841402 ns/iter 1.11
Regex_Caret_Period_Range_Dollar 2.3552034675172933 ns/iter 2.115400415509942 ns/iter 1.11
Regex_Nested_Backtrack 38.31059392756708 ns/iter 30.452080268600955 ns/iter 1.26
JSON_Array_Of_Objects_Unique 439.2887840996315 ns/iter 379.29684082028797 ns/iter 1.16
JSON_Parse_1 25631.13042160406 ns/iter 24168.172547949627 ns/iter 1.06
JSON_Parse_Real 45056.9630426962 ns/iter 27458.42401346213 ns/iter 1.64
JSON_Parse_Decimal 390645.11405668856 ns/iter 303698.704057271 ns/iter 1.29
JSON_Fast_Hash_Helm_Chart_Lock 69.2978133593395 ns/iter 80.55993856964943 ns/iter 0.86
JSON_Equality_Helm_Chart_Lock 142.93174972632323 ns/iter 187.29001426642856 ns/iter 0.76
JSON_String_Equal/10 6.907338729870068 ns/iter 8.909228541231705 ns/iter 0.78
JSON_String_Equal/100 6.784413037331706 ns/iter 8.813664741976954 ns/iter 0.77
JSON_String_Equal_Small_By_Perfect_Hash/10 0.3447491062979758 ns/iter 0.4546201589457142 ns/iter 0.76
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.3452215871977513 ns/iter 4.458446365163346 ns/iter 0.75
JSON_String_Fast_Hash/10 2.433747101773213 ns/iter 3.032281853966988 ns/iter 0.80
JSON_String_Fast_Hash/100 2.2067025705687207 ns/iter 2.68015968560484 ns/iter 0.82
JSON_String_Key_Hash/10 1.416579743634108 ns/iter 1.9951650797733653 ns/iter 0.71
JSON_String_Key_Hash/100 2.1982789667792138 ns/iter 3.251892968034124 ns/iter 0.68
JSON_Object_Defines_Miss_Same_Length 2.7475899074899868 ns/iter 3.24302494072466 ns/iter 0.85
JSON_Object_Defines_Miss_Too_Small 3.2912200181191693 ns/iter 3.621711317485279 ns/iter 0.91
JSON_Object_Defines_Miss_Too_Large 3.510774746338605 ns/iter 3.3716010235198692 ns/iter 1.04
Pointer_Object_Traverse 19.627225120449303 ns/iter 17.70398822636586 ns/iter 1.11
Pointer_Object_Try_Traverse 25.90719166736772 ns/iter 23.97808752204454 ns/iter 1.08
Pointer_Push_Back_Pointer_To_Weak_Pointer 234.13423490035024 ns/iter 183.98254615215365 ns/iter 1.27
Schema_Frame_WoT_References 12069239.22413729 ns/iter 8721431.506850025 ns/iter 1.38
Schema_Frame_OMC_References 63574958.27271784 ns/iter 46960554.53846034 ns/iter 1.35
Schema_Frame_OMC_Locations 57027008.29999685 ns/iter 49398897.19998973 ns/iter 1.15
Schema_Frame_ISO_Language_Locations 197809402.999989 ns/iter 164279008.40003532 ns/iter 1.20
Schema_Iterator_ISO_Language 4072071.8651681216 ns/iter 4877523.668637985 ns/iter 0.83
Schema_PointerWalker_ISO_Language 8384654.6333335135 ns/iter 7300153.202019526 ns/iter 1.15
Schema_Frame_ISO_Language_Locations_To_JSON 105326125.0000105 ns/iter 131973861.16667075 ns/iter 0.80
Schema_Tracker_ISO_Language 44131149.333319776 ns/iter 55122160.71429066 ns/iter 0.80
Schema_Tracker_ISO_Language_To_JSON 15706762.60464922 ns/iter 20141646.999996334 ns/iter 0.78
Schema_Format_ISO_Language_To_JSON 122003041.66666836 ns/iter 169723302.24990627 ns/iter 0.72
Schema_Bundle_Meta_2020_12 1740018.830148844 ns/iter 2575580.2994241505 ns/iter 0.68
Alterschema_Check_Readibility_ISO_Language_Set_3 192780361.33331022 ns/iter 294145583.3333748 ns/iter 0.66
Alterschema_Check_Readibility_OMC 45562636.13333916 ns/iter 74017435.92306677 ns/iter 0.62
URITemplateRouter_Create 16485.718065527937 ns/iter 24339.509697135087 ns/iter 0.68
URITemplateRouter_Match 169.8130372730407 ns/iter 224.01843239465836 ns/iter 0.76
URITemplateRouterView_Restore 9925.147327937171 ns/iter 13274.60673947871 ns/iter 0.75
URITemplateRouterView_Match 116.27548482915415 ns/iter 150.09674472595322 ns/iter 0.77

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

Copy link

@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: c7e6cfb Previous: 171825a Ratio
URITemplateRouter_Create 14896.697110023117 ns/iter 14950.485877227557 ns/iter 1.00
URITemplateRouter_Match 178.8935616561076 ns/iter 157.35500129230456 ns/iter 1.14
URITemplateRouterView_Restore 7926.799337592085 ns/iter 8557.516316832034 ns/iter 0.93
URITemplateRouterView_Match 120.85492496756915 ns/iter 125.38880580472545 ns/iter 0.96
Alterschema_Check_Readibility_ISO_Language_Set_3 296539578.49996006 ns/iter 300511540.00000226 ns/iter 0.99
Alterschema_Check_Readibility_OMC 49472213.78571547 ns/iter 49090338.07143714 ns/iter 1.01
Schema_Frame_WoT_References 8535878.726190407 ns/iter 8317355.388236833 ns/iter 1.03
Schema_Frame_OMC_References 42833319.06249543 ns/iter 42022542.43749337 ns/iter 1.02
Schema_Frame_OMC_Locations 39005093.50000903 ns/iter 39235919.61111268 ns/iter 0.99
Schema_Frame_ISO_Language_Locations 179283311.50000077 ns/iter 173933727.2499597 ns/iter 1.03
Schema_Iterator_ISO_Language 3677835.617800775 ns/iter 4119550.3313610433 ns/iter 0.89
Schema_PointerWalker_ISO_Language 4777480.055171791 ns/iter 4567100.96078448 ns/iter 1.05
Schema_Frame_ISO_Language_Locations_To_JSON 285683057.3333203 ns/iter 293396208.66661185 ns/iter 0.97
Schema_Tracker_ISO_Language 54939519.769224994 ns/iter 55445547.46153642 ns/iter 0.99
Schema_Tracker_ISO_Language_To_JSON 38686720.111109525 ns/iter 39349123.052632324 ns/iter 0.98
Schema_Format_ISO_Language_To_JSON 184984387.50003743 ns/iter 181157448.49995962 ns/iter 1.02
Schema_Bundle_Meta_2020_12 2360716.272720794 ns/iter 2397150.561651801 ns/iter 0.98
Pointer_Object_Traverse 49.50323283023951 ns/iter 48.92344537263582 ns/iter 1.01
Pointer_Object_Try_Traverse 22.390804236254855 ns/iter 23.063689564989865 ns/iter 0.97
Pointer_Push_Back_Pointer_To_Weak_Pointer 133.83572247870586 ns/iter 159.527882170718 ns/iter 0.84
JSON_Array_Of_Objects_Unique 400.9380633076679 ns/iter 419.15403661390985 ns/iter 0.96
JSON_Parse_1 32779.08321195677 ns/iter 33087.694870462816 ns/iter 0.99
JSON_Parse_Real 44044.092813996605 ns/iter 44762.48524527327 ns/iter 0.98
JSON_Parse_Decimal 155166.43351422003 ns/iter 153709.32454403536 ns/iter 1.01
JSON_Fast_Hash_Helm_Chart_Lock 52.65223861458555 ns/iter 61.117962082034985 ns/iter 0.86
JSON_Equality_Helm_Chart_Lock 151.28065276963875 ns/iter 159.48010184836846 ns/iter 0.95
JSON_String_Equal/10 6.342692828902533 ns/iter 6.932082117103014 ns/iter 0.91
JSON_String_Equal/100 6.969263327949573 ns/iter 7.54866970978154 ns/iter 0.92
JSON_String_Equal_Small_By_Perfect_Hash/10 0.6245389871731104 ns/iter 0.624019416180434 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 13.701820878465766 ns/iter 25.79151537019856 ns/iter 0.53
JSON_String_Fast_Hash/10 1.9050698755330007 ns/iter 2.2552714298273093 ns/iter 0.84
JSON_String_Fast_Hash/100 1.9072987326002584 ns/iter 2.254746930948319 ns/iter 0.85
JSON_String_Key_Hash/10 2.9268028339315957 ns/iter 1.2447718109013304 ns/iter 2.35
JSON_String_Key_Hash/100 13.370540964393205 ns/iter 12.43613682657052 ns/iter 1.08
JSON_Object_Defines_Miss_Same_Length 2.8080453591689807 ns/iter 2.4900424456024406 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Small 2.801209551155099 ns/iter 2.4886545747568447 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Large 2.801618840193003 ns/iter 2.4878832228378984 ns/iter 1.13
Regex_Lower_S_Or_Upper_S_Asterisk 3.1130307909351895 ns/iter 3.1103034373064586 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.1336280361929876 ns/iter 3.1135250955958464 ns/iter 1.01
Regex_Period_Asterisk 3.1117504351753476 ns/iter 3.1118702639396245 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 3.1103521911609344 ns/iter 3.1112546682904716 ns/iter 1.00
Regex_Period_Plus 2.7993946411388957 ns/iter 3.1088572107998718 ns/iter 0.90
Regex_Period 2.7992889696325625 ns/iter 3.1138079143500907 ns/iter 0.90
Regex_Caret_Period_Plus_Dollar 2.801212125807292 ns/iter 3.1146145671935437 ns/iter 0.90
Regex_Caret_Group_Period_Plus_Group_Dollar 2.8036265550568635 ns/iter 3.1144980067141024 ns/iter 0.90
Regex_Caret_Period_Asterisk_Dollar 3.916826082583275 ns/iter 4.354569720445866 ns/iter 0.90
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.1148559807987195 ns/iter 4.3577549404911995 ns/iter 0.71
Regex_Caret_X_Hyphen 13.064732920735974 ns/iter 13.680092049071131 ns/iter 0.96
Regex_Period_Md_Dollar 38.60841060247667 ns/iter 36.831473325470796 ns/iter 1.05
Regex_Caret_Slash_Period_Asterisk 7.7838847941359575 ns/iter 8.396771885240254 ns/iter 0.93
Regex_Caret_Period_Range_Dollar 4.0429897825239935 ns/iter 4.666082006476507 ns/iter 0.87
Regex_Nested_Backtrack 61.255386784518286 ns/iter 58.10986982344471 ns/iter 1.05

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

@jviotti jviotti force-pushed the jsonschema-string-views branch from 23bf150 to 3b6292c Compare January 5, 2026 21:59
Signed-off-by: Juan Cruz Viotti <[email protected]>
@jviotti jviotti force-pushed the jsonschema-string-views branch from 3b6292c to c7e6cfb Compare January 5, 2026 22:00
@jviotti jviotti changed the title [WIP] Start making more use of string views in the JSON Schema module Start making more use of string views in the JSON Schema module Jan 5, 2026
@jviotti jviotti marked this pull request as ready for review January 5, 2026 22:03
@augmentcode
Copy link

augmentcode bot commented Jan 5, 2026

🤖 Augment PR Summary

Summary: This PR refactors the JSON Schema module APIs to rely more heavily on std::string_view, reducing copies and simplifying “unset” handling.

Changes:

  • Replaced many std::optional<std::string> parameters (e.g., default dialect/id) with std::string_view using "" as the “unset” sentinel.
  • Updated core JSON Schema helpers (identify, reidentify, dialect, metaschema, vocabularies, bundling/formatting/frame APIs) to accept and propagate string views.
  • Changed dialect() to return std::string_view; updated call sites/tests to use .empty() checks instead of has_value().
  • Changed base_dialect() to return a std::string (empty string indicates “unknown”), and adjusted logic accordingly.
  • Updated schema walker/iterator entry types to carry dialect as std::string_view while keeping base dialect as an owned string.
  • Propagated these signature updates into extensions (e.g., editorschema/alterschema) and updated unit tests.

Technical Notes: The refactor intentionally keeps ownership where lifetimes are complex (e.g., base_dialect()) while enabling views in hot paths like walking/framing/bundling.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

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

Fix All in Augment

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

Copy link

@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/gcc)

Details
Benchmark suite Current: c7e6cfb Previous: 171825a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.148986603685663 ns/iter 2.0546089431399377 ns/iter 1.05
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.1496423128641338 ns/iter 2.0644262633043717 ns/iter 1.04
Regex_Period_Asterisk 2.1505838822489425 ns/iter 2.069600533050129 ns/iter 1.04
Regex_Group_Period_Asterisk_Group 2.1552838652152095 ns/iter 2.070686468589174 ns/iter 1.04
Regex_Period_Plus 2.267921875035783 ns/iter 2.125768495099346 ns/iter 1.07
Regex_Period 2.1740058663827333 ns/iter 2.1285899657768517 ns/iter 1.02
Regex_Caret_Period_Plus_Dollar 2.128818756995688 ns/iter 2.136499949230135 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 2.1310374553548463 ns/iter 2.131353972009174 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 2.0540850876615027 ns/iter 2.0873785278518584 ns/iter 0.98
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.0523157438832613 ns/iter 2.1695315816951566 ns/iter 0.95
Regex_Caret_X_Hyphen 6.262441621293584 ns/iter 6.77855929925272 ns/iter 0.92
Regex_Period_Md_Dollar 20.744118436185207 ns/iter 22.549430355354417 ns/iter 0.92
Regex_Caret_Slash_Period_Asterisk 4.696627743967875 ns/iter 5.076849587804452 ns/iter 0.93
Regex_Caret_Period_Range_Dollar 2.149403886592918 ns/iter 2.3298747879866335 ns/iter 0.92
Regex_Nested_Backtrack 43.377610734295686 ns/iter 47.631113259067476 ns/iter 0.91
JSON_Array_Of_Objects_Unique 259.13348363156985 ns/iter 272.5803153377187 ns/iter 0.95
JSON_Parse_1 23436.55840974741 ns/iter 23875.458895740416 ns/iter 0.98
JSON_Parse_Real 24570.212467784386 ns/iter 24468.305451312124 ns/iter 1.00
JSON_Parse_Decimal 261369.10473858868 ns/iter 249044.63696915723 ns/iter 1.05
JSON_Fast_Hash_Helm_Chart_Lock 33.10171731317834 ns/iter 31.298991941108742 ns/iter 1.06
JSON_Equality_Helm_Chart_Lock 125.10991146281091 ns/iter 124.88216300240754 ns/iter 1.00
JSON_String_Equal/10 5.660998166514549 ns/iter 5.928565271415727 ns/iter 0.95
JSON_String_Equal/100 5.351904237977571 ns/iter 5.085450012771458 ns/iter 1.05
JSON_String_Equal_Small_By_Perfect_Hash/10 0.787661723724233 ns/iter 0.7480242261489453 ns/iter 1.05
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.6162327880090643 ns/iter 3.491421658100326 ns/iter 1.04
JSON_String_Fast_Hash/10 1.838595184740595 ns/iter 1.8318790634340831 ns/iter 1.00
JSON_String_Fast_Hash/100 1.8398992041341393 ns/iter 1.8869729257921344 ns/iter 0.98
JSON_String_Key_Hash/10 1.4382102610029832 ns/iter 1.5026178665782863 ns/iter 0.96
JSON_String_Key_Hash/100 2.556806298940418 ns/iter 2.761722013893121 ns/iter 0.93
JSON_Object_Defines_Miss_Same_Length 1.7736178430938858 ns/iter 1.9552099076980571 ns/iter 0.91
JSON_Object_Defines_Miss_Too_Small 1.7739415480116905 ns/iter 1.9239343490894267 ns/iter 0.92
JSON_Object_Defines_Miss_Too_Large 1.7973353120707758 ns/iter 1.919016500174893 ns/iter 0.94
Pointer_Object_Traverse 50.344886572803176 ns/iter 57.29373235444706 ns/iter 0.88
Pointer_Object_Try_Traverse 36.838793012922835 ns/iter 37.05527204192587 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 153.28594530161834 ns/iter 162.2742848865011 ns/iter 0.94
Schema_Frame_WoT_References 7646812.187446343 ns/iter 8128466.931256381 ns/iter 0.94
Schema_Frame_OMC_References 39417783.419291176 ns/iter 39446671.80379232 ns/iter 1.00
Schema_Frame_OMC_Locations 36754206.60721628 ns/iter 36051952.838897705 ns/iter 1.02
Schema_Frame_ISO_Language_Locations 149291753.7689209 ns/iter 146746015.54870605 ns/iter 1.02
Schema_Iterator_ISO_Language 2592946.7061932166 ns/iter 3142344.213165013 ns/iter 0.83
Schema_PointerWalker_ISO_Language 8496662.238975624 ns/iter 8177717.994241154 ns/iter 1.04
Schema_Frame_ISO_Language_Locations_To_JSON 134844398.49853516 ns/iter 128694852.19319661 ns/iter 1.05
Schema_Tracker_ISO_Language 38314382.235209145 ns/iter 37242312.18036852 ns/iter 1.03
Schema_Tracker_ISO_Language_To_JSON 22930765.15197754 ns/iter 24356554.29445464 ns/iter 0.94
Schema_Format_ISO_Language_To_JSON 156805932.52182007 ns/iter 157369434.8335266 ns/iter 1.00
Schema_Bundle_Meta_2020_12 1811070.1016017369 ns/iter 1869490.9413655598 ns/iter 0.97
Alterschema_Check_Readibility_ISO_Language_Set_3 209800640.74198404 ns/iter 228586276.37227377 ns/iter 0.92
Alterschema_Check_Readibility_OMC 43563380.83744049 ns/iter 45412604.01407877 ns/iter 0.96
URITemplateRouter_Create 12878.890268286972 ns/iter 13981.10890803599 ns/iter 0.92
URITemplateRouter_Match 159.22092792438792 ns/iter 169.76586843638808 ns/iter 0.94
URITemplateRouterView_Restore 8605.364387973164 ns/iter 9254.89914046713 ns/iter 0.93
URITemplateRouterView_Match 105.73290519503365 ns/iter 108.85565171662408 ns/iter 0.97

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

@jviotti jviotti merged commit e873f5b into main Jan 6, 2026
13 checks passed
@jviotti jviotti deleted the jsonschema-string-views branch January 6, 2026 13:05
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.

2 participants