Skip to content

Better support string view across the board#2371

Merged
jviotti merged 4 commits intomainfrom
string-view-apis
May 8, 2026
Merged

Better support string view across the board#2371
jviotti merged 4 commits intomainfrom
string-view-apis

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented May 8, 2026

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
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.

No issues found across 14 files

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

augmentcode Bot commented May 8, 2026

🤖 Augment PR Summary

Summary: Expands the core APIs to accept std::string_view in more places, making it easier to work with non-owning buffers and subviews.

Changes:

  • Switches the string-based parse_json overloads to take std::basic_string_view (with/without line/column and callback variants).
  • Adds std::string_view-based fast-path overloads in JSONObject and corresponding convenience overloads in JSON (defines, at, try_at, assign, erase).
  • Updates regex helpers (to_regex, matches, matches_if_valid) to accept std::string_view and handle subviews.
  • Updates GMT parsing (from_gmt) to accept std::string_view.
  • Adjusts JSON auto-serialization traits so std::string_view is treated as a string (not a list-like container).
  • Adds unit tests covering string_view inputs and subviews across JSON, regex, and time.

Technical Notes: The new APIs enable parsing/matching directly from slices without requiring null-termination; callers still must ensure the referenced buffer remains valid for the duration of the call.

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

Fix All in Augment

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

Comment thread src/core/json/json.cc Outdated
const std::basic_string_view<JSON::Char, JSON::CharTraits> input,
std::uint64_t &line, std::uint64_t &column) -> JSON {
const char *cursor{input.data()};
return internal_parse_json(cursor, input.data() + input.size(), line, column,
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 8, 2026

Choose a reason for hiding this comment

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

std::basic_string_view can be default-constructed with data() == nullptr, so computing input.data() + input.size() is undefined behavior even when size() == 0. That can leak UB into internal_parse_json for empty/default views (and similar call sites).

Severity: high

Other Locations
  • src/core/json/json.cc:108
  • src/core/json/json.cc:145
  • src/core/json/json.cc:174
  • src/core/regex/regex.cc:33
  • src/core/regex/regex.cc:40

Fix This in Augment

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

Comment thread src/core/json/include/sourcemeta/core/json_value.h
Comment thread src/core/json/include/sourcemeta/core/json.h
jviotti added 2 commits May 8, 2026 11:39
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
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: 67d584f Previous: 19439f7 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.1804879063742026 ns/iter 3.519034244695396 ns/iter 0.62
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.191986244319542 ns/iter 3.5153865425666453 ns/iter 0.62
Regex_Period_Asterisk 2.186441181564187 ns/iter 3.515272128708816 ns/iter 0.62
Regex_Group_Period_Asterisk_Group 2.1814283827706937 ns/iter 3.5174710546915 ns/iter 0.62
Regex_Period_Plus 2.8020163144791166 ns/iter 3.5152465864296056 ns/iter 0.80
Regex_Period 3.116155299961601 ns/iter 3.5174690454006194 ns/iter 0.89
Regex_Caret_Period_Plus_Dollar 2.8150198470958094 ns/iter 3.5153984707504593 ns/iter 0.80
Regex_Caret_Group_Period_Plus_Group_Dollar 3.1174480752528355 ns/iter 3.5150285687230487 ns/iter 0.89
Regex_Caret_Period_Asterisk_Dollar 3.1180707520985997 ns/iter 3.5149177699082435 ns/iter 0.89
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.4251465917344586 ns/iter 3.867879353644049 ns/iter 0.89
Regex_Caret_X_Hyphen 6.547451650480898 ns/iter 11.951214298274188 ns/iter 0.55
Regex_Period_Md_Dollar 27.493889679151238 ns/iter 26.69512789953464 ns/iter 1.03
Regex_Caret_Slash_Period_Asterisk 5.9203025650132775 ns/iter 6.3291005851173185 ns/iter 0.94
Regex_Caret_Period_Range_Dollar 3.734717988111251 ns/iter 3.866191841343166 ns/iter 0.97
Regex_Nested_Backtrack 36.672138988818084 ns/iter 47.75763325533526 ns/iter 0.77
JSON_Array_Of_Objects_Unique 422.3116419001487 ns/iter 458.143984862649 ns/iter 0.92
JSON_Parse_1 5928.95507918584 ns/iter 5795.474366145222 ns/iter 1.02
JSON_Parse_Real 10752.500424442971 ns/iter 10383.993973567289 ns/iter 1.04
JSON_Parse_Decimal 11310.95433162566 ns/iter 11132.331688458946 ns/iter 1.02
JSON_Parse_Schema_ISO_Language 3655084.6910993317 ns/iter 3727255.3936170326 ns/iter 0.98
JSON_Fast_Hash_Helm_Chart_Lock 60.44472033580188 ns/iter 72.81302266230055 ns/iter 0.83
JSON_Equality_Helm_Chart_Lock 164.14344509509337 ns/iter 158.55495453682053 ns/iter 1.04
JSON_Divisible_By_Decimal 248.76924162704842 ns/iter 254.0085132107726 ns/iter 0.98
JSON_String_Equal/10 5.925594561838453 ns/iter 5.634383731537576 ns/iter 1.05
JSON_String_Equal/100 6.568537433823579 ns/iter 6.329691111134432 ns/iter 1.04
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9366713926561393 ns/iter 1.0549316013417909 ns/iter 0.89
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.757771811866935 ns/iter 12.336001284298188 ns/iter 1.20
JSON_String_Fast_Hash/10 2.8045179260631534 ns/iter 2.813919923780665 ns/iter 1.00
JSON_String_Fast_Hash/100 2.8130078384504156 ns/iter 2.8129091095451524 ns/iter 1.00
JSON_String_Key_Hash/10 2.707790447210789 ns/iter 2.461465498363596 ns/iter 1.10
JSON_String_Key_Hash/100 9.030515484482406 ns/iter 8.088933885614189 ns/iter 1.12
JSON_Object_Defines_Miss_Same_Length 3.7567451250126718 ns/iter 4.21897035484807 ns/iter 0.89
JSON_Object_Defines_Miss_Too_Small 3.7452424207416324 ns/iter 4.222210600713004 ns/iter 0.89
JSON_Object_Defines_Miss_Too_Large 3.7409134859628153 ns/iter 4.218925750429501 ns/iter 0.89
Pointer_Object_Traverse 25.306551867173667 ns/iter 27.24293660065415 ns/iter 0.93
Pointer_Object_Try_Traverse 27.887166233420665 ns/iter 29.672902187612483 ns/iter 0.94
Pointer_Push_Back_Pointer_To_Weak_Pointer 226.13879881835769 ns/iter 198.36065230316362 ns/iter 1.14
Pointer_Walker_Schema_ISO_Language 2957275.6190475747 ns/iter 3358533.08490534 ns/iter 0.88
Pointer_Maybe_Tracked_Deeply_Nested/0 1431057.7096773337 ns/iter 1402669.9379999172 ns/iter 1.02
Pointer_Maybe_Tracked_Deeply_Nested/1 1786192.793367277 ns/iter 1722763.0297029037 ns/iter 1.04
Pointer_Position_Tracker_Get_Deeply_Nested 643.7632015895211 ns/iter 672.0063795066571 ns/iter 0.96
Schema_Frame_WoT_References 5184072.540740729 ns/iter 5334968.664122153 ns/iter 0.97
Schema_Frame_OMC_References 21280835.878786948 ns/iter 23145613.666667942 ns/iter 0.92
Schema_Frame_OMC_Locations 19637586.51428569 ns/iter 20965683.941175725 ns/iter 0.94
Schema_Frame_ISO_Language_Locations 99121231.66664816 ns/iter 106282155.66667147 ns/iter 0.93
Schema_Frame_KrakenD_References 40454794.388892874 ns/iter 45273592.46666644 ns/iter 0.89
Schema_Frame_KrakenD_Reachable 587253157.9999532 ns/iter 664314872.9999666 ns/iter 0.88
Schema_Iterator_ISO_Language 3009187.846154006 ns/iter 3002980.927038858 ns/iter 1.00
Schema_Frame_ISO_Language_Locations_To_JSON 111931470.5999841 ns/iter 112971550.3333273 ns/iter 0.99
Schema_Tracker_ISO_Language 4964401.949999748 ns/iter 5039866.471830964 ns/iter 0.99
Schema_Tracker_ISO_Language_To_JSON 19401610.527779665 ns/iter 18221636.026315704 ns/iter 1.06
Schema_Format_ISO_Language_To_JSON 110185223.16669531 ns/iter 113579328.33334416 ns/iter 0.97
Schema_Bundle_Meta_2020_12 1701729.9781001227 ns/iter 1704428.473425341 ns/iter 1.00
Schema_Frame_Many_Resources_References 382772177.49998724 ns/iter 388372852.5000265 ns/iter 0.99
EditorSchema_ForEditor_EmbeddedResources 14051174.29999791 ns/iter 14067464.04001069 ns/iter 1.00
URITemplateRouter_Create 20401.651649928546 ns/iter 17639.97928815782 ns/iter 1.16
URITemplateRouter_Match 173.65000779546557 ns/iter 176.9050241153906 ns/iter 0.98
URITemplateRouter_Match_BasePath 202.11572705946915 ns/iter 216.95208283294528 ns/iter 0.93
URITemplateRouterView_Restore 5135.113091668736 ns/iter 6681.492462908412 ns/iter 0.77
URITemplateRouterView_Match 148.68872722057077 ns/iter 157.68871646252333 ns/iter 0.94
URITemplateRouterView_Match_BasePath 166.21433981873187 ns/iter 188.61042188792004 ns/iter 0.88
URITemplateRouterView_Arguments 473.6730952443569 ns/iter 481.6359135166303 ns/iter 0.98
JSONL_Parse_Large 10889977.812500007 ns/iter 9987180.08571424 ns/iter 1.09
JSONL_Parse_Large_GZIP 12099002.74137916 ns/iter 11336695.822579611 ns/iter 1.07
HTML_Build_Table_100000 63699047.36363258 ns/iter 86506427.49999803 ns/iter 0.74
HTML_Render_Table_100000 5360445.63636403 ns/iter 5088135.061069487 ns/iter 1.05

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: 67d584f Previous: 19439f7 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.4091562933681523 ns/iter 1.6785563965506998 ns/iter 1.44
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.3581252778299997 ns/iter 1.6783573177780746 ns/iter 1.41
Regex_Period_Asterisk 2.2601485575037716 ns/iter 1.679497070518592 ns/iter 1.35
Regex_Group_Period_Asterisk_Group 2.2426405310770776 ns/iter 1.6918143568462602 ns/iter 1.33
Regex_Period_Plus 2.560235597659184 ns/iter 2.0342839094382685 ns/iter 1.26
Regex_Period 3.1343874869092274 ns/iter 2.0326858677650814 ns/iter 1.54
Regex_Caret_Period_Plus_Dollar 2.8181890632681847 ns/iter 2.012263136852652 ns/iter 1.40
Regex_Caret_Group_Period_Plus_Group_Dollar 2.8487951033146093 ns/iter 2.014561792401256 ns/iter 1.41
Regex_Caret_Period_Asterisk_Dollar 2.519463291374956 ns/iter 1.6803648311657622 ns/iter 1.50
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.50623500043159 ns/iter 1.6798346317867379 ns/iter 1.49
Regex_Caret_X_Hyphen 8.6390052305296 ns/iter 6.369221939521625 ns/iter 1.36
Regex_Period_Md_Dollar 35.56987718676523 ns/iter 19.698325224189357 ns/iter 1.81
Regex_Caret_Slash_Period_Asterisk 9.186468596010226 ns/iter 4.713276626165361 ns/iter 1.95
Regex_Caret_Period_Range_Dollar 2.0980398755022756 ns/iter 1.7615110971986556 ns/iter 1.19
Regex_Nested_Backtrack 29.0444853166637 ns/iter 24.976174808620726 ns/iter 1.16
JSON_Array_Of_Objects_Unique 422.6904560425231 ns/iter 343.86093834848754 ns/iter 1.23
JSON_Parse_1 4391.612141101019 ns/iter 3976.089222371484 ns/iter 1.10
JSON_Parse_Real 7827.224472627861 ns/iter 6283.9297182586115 ns/iter 1.25
JSON_Parse_Decimal 11687.733455721773 ns/iter 8074.345802602322 ns/iter 1.45
JSON_Parse_Schema_ISO_Language 5701584.156864271 ns/iter 3837502.2663044347 ns/iter 1.49
JSON_Fast_Hash_Helm_Chart_Lock 66.49331301871278 ns/iter 58.09933058855148 ns/iter 1.14
JSON_Equality_Helm_Chart_Lock 158.59478572684654 ns/iter 125.56483540150441 ns/iter 1.26
JSON_Divisible_By_Decimal 207.8961197062753 ns/iter 172.28194326564545 ns/iter 1.21
JSON_String_Equal/10 7.588887446370452 ns/iter 6.400718976139079 ns/iter 1.19
JSON_String_Equal/100 7.7677004422612415 ns/iter 6.0440373067270965 ns/iter 1.29
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9519538056274622 ns/iter 0.7617388067912046 ns/iter 1.25
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.4750397423519837 ns/iter 3.3832560689700073 ns/iter 1.03
JSON_String_Fast_Hash/10 2.475807518277647 ns/iter 3.1406944619787764 ns/iter 0.79
JSON_String_Fast_Hash/100 2.170855481684807 ns/iter 2.04375779499321 ns/iter 1.06
JSON_String_Key_Hash/10 1.3604781664644718 ns/iter 1.3439711897896154 ns/iter 1.01
JSON_String_Key_Hash/100 2.286124160257837 ns/iter 2.1106858036409957 ns/iter 1.08
JSON_Object_Defines_Miss_Same_Length 2.750758896437243 ns/iter 2.345719003479202 ns/iter 1.17
JSON_Object_Defines_Miss_Too_Small 2.6069349000889845 ns/iter 2.351012838262987 ns/iter 1.11
JSON_Object_Defines_Miss_Too_Large 2.4842492970446903 ns/iter 2.3512402287453824 ns/iter 1.06
Pointer_Object_Traverse 14.760462486037822 ns/iter 13.861890107748458 ns/iter 1.06
Pointer_Object_Try_Traverse 20.289736816119717 ns/iter 18.829162475853437 ns/iter 1.08
Pointer_Push_Back_Pointer_To_Weak_Pointer 159.48103513195434 ns/iter 153.06811958548454 ns/iter 1.04
Pointer_Walker_Schema_ISO_Language 4250224.9999991665 ns/iter 4169692.6762996837 ns/iter 1.02
Pointer_Maybe_Tracked_Deeply_Nested/0 980635.751743477 ns/iter 1061290.7912916187 ns/iter 0.92
Pointer_Maybe_Tracked_Deeply_Nested/1 1431059.941520824 ns/iter 1415000.6943873637 ns/iter 1.01
Pointer_Position_Tracker_Get_Deeply_Nested 358.5766772951844 ns/iter 349.72727004973416 ns/iter 1.03
Schema_Frame_WoT_References 5543927.499998063 ns/iter 4631860.377483595 ns/iter 1.20
Schema_Frame_OMC_References 27689416.66666554 ns/iter 23665308.89655443 ns/iter 1.17
Schema_Frame_OMC_Locations 31372365.95650551 ns/iter 22015532.258064337 ns/iter 1.43
Schema_Frame_ISO_Language_Locations 84215572.87499581 ns/iter 71667921.33335143 ns/iter 1.18
Schema_Frame_KrakenD_References 55977076.923052385 ns/iter 43478117.18750449 ns/iter 1.29
Schema_Frame_KrakenD_Reachable 439813562.4999213 ns/iter 366827499.9995447 ns/iter 1.20
Schema_Iterator_ISO_Language 2396875.1490908535 ns/iter 2205113.3730406677 ns/iter 1.09
Schema_Frame_ISO_Language_Locations_To_JSON 84303680.50001864 ns/iter 91377113.14289324 ns/iter 0.92
Schema_Tracker_ISO_Language 8742644.03703673 ns/iter 9261531.488370333 ns/iter 0.94
Schema_Tracker_ISO_Language_To_JSON 13052959.134615075 ns/iter 15286584.272726858 ns/iter 0.85
Schema_Format_ISO_Language_To_JSON 88372319.44451357 ns/iter 73668661.74999131 ns/iter 1.20
Schema_Bundle_Meta_2020_12 1297718.1491339772 ns/iter 1276662.0800723657 ns/iter 1.02
Schema_Frame_Many_Resources_References 268998687.50001585 ns/iter 273775277.6667245 ns/iter 0.98
EditorSchema_ForEditor_EmbeddedResources 10690525.318178708 ns/iter 10787691.348503249 ns/iter 0.99
URITemplateRouter_Create 18564.625886823076 ns/iter 16402.84698369605 ns/iter 1.13
URITemplateRouter_Match 164.52624934787366 ns/iter 162.2357691859586 ns/iter 1.01
URITemplateRouter_Match_BasePath 190.29245610012492 ns/iter 191.4889950361174 ns/iter 0.99
URITemplateRouterView_Restore 13864.452307271065 ns/iter 14202.813750772182 ns/iter 0.98
URITemplateRouterView_Match 130.44674155005472 ns/iter 129.20572872150728 ns/iter 1.01
URITemplateRouterView_Match_BasePath 150.07257826214712 ns/iter 151.48978058710608 ns/iter 0.99
URITemplateRouterView_Arguments 412.42842823488405 ns/iter 402.66367216110365 ns/iter 1.02
JSONL_Parse_Large 12262769.000005247 ns/iter 14842292.41818453 ns/iter 0.83
JSONL_Parse_Large_GZIP 13360793.294119576 ns/iter 13553616.019608479 ns/iter 0.99
HTML_Build_Table_100000 65027507.5454374 ns/iter 63813878.8181922 ns/iter 1.02
HTML_Render_Table_100000 4542337.959065392 ns/iter 3116518.0995494295 ns/iter 1.46

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 (windows/msvc)

Details
Benchmark suite Current: 67d584f Previous: 19439f7 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 7.505187499999368 ns/iter 4.086222105511193 ns/iter 1.84
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 7.503392857142188 ns/iter 4.7204471087508715 ns/iter 1.59
Regex_Period_Asterisk 7.506924107144438 ns/iter 4.0808481008568 ns/iter 1.84
Regex_Group_Period_Asterisk_Group 7.497709821429054 ns/iter 4.703805144428613 ns/iter 1.59
Regex_Period_Plus 9.693196874998478 ns/iter 3.7676748147007206 ns/iter 2.57
Regex_Period 9.671339688967096 ns/iter 3.7742399271394853 ns/iter 2.56
Regex_Caret_Period_Plus_Dollar 9.687416474609826 ns/iter 4.409997500000884 ns/iter 2.20
Regex_Caret_Group_Period_Plus_Group_Dollar 9.680227188928125 ns/iter 4.577694999998982 ns/iter 2.11
Regex_Caret_Period_Asterisk_Dollar 7.508881696427494 ns/iter 4.721387188553341 ns/iter 1.59
Regex_Caret_Group_Period_Asterisk_Group_Dollar 7.503010044643028 ns/iter 4.739160278435073 ns/iter 1.58
Regex_Caret_X_Hyphen 11.81997142857329 ns/iter 7.892532366073267 ns/iter 1.50
Regex_Period_Md_Dollar 37.48701897344415 ns/iter 35.422392173519064 ns/iter 1.06
Regex_Caret_Slash_Period_Asterisk 11.546467857142163 ns/iter 7.877453124999687 ns/iter 1.47
Regex_Caret_Period_Range_Dollar 9.721428974456158 ns/iter 4.75266304636644 ns/iter 2.05
Regex_Nested_Backtrack 48.935084270516164 ns/iter 95.77328143868213 ns/iter 0.51
JSON_Array_Of_Objects_Unique 496.0475684024119 ns/iter 493.56219999981477 ns/iter 1.01
JSON_Parse_1 7902.536830357577 ns/iter 7938.345982143602 ns/iter 1.00
JSON_Parse_Real 15331.094057616585 ns/iter 16224.261160715516 ns/iter 0.94
JSON_Parse_Decimal 16251.189628498529 ns/iter 15627.524553570383 ns/iter 1.04
JSON_Parse_Schema_ISO_Language 5842245.000001185 ns/iter 6046397.321428896 ns/iter 0.97
JSON_Fast_Hash_Helm_Chart_Lock 66.22911607142409 ns/iter 68.36204241069359 ns/iter 0.97
JSON_Equality_Helm_Chart_Lock 255.26157142857235 ns/iter 247.59935714281968 ns/iter 1.03
JSON_Divisible_By_Decimal 250.797785714261 ns/iter 252.49935714287273 ns/iter 0.99
JSON_String_Equal/10 12.54593571428586 ns/iter 12.298865624998712 ns/iter 1.02
JSON_String_Equal/100 13.200036771426861 ns/iter 12.873801785713924 ns/iter 1.03
JSON_String_Equal_Small_By_Perfect_Hash/10 2.194858749999895 ns/iter 1.8866022338269295 ns/iter 1.16
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 12.590310714285483 ns/iter 12.623021428571032 ns/iter 1.00
JSON_String_Fast_Hash/10 4.072954799106807 ns/iter 3.866013207382161 ns/iter 1.05
JSON_String_Fast_Hash/100 4.093048846594797 ns/iter 3.7822912432449565 ns/iter 1.08
JSON_String_Key_Hash/10 4.252090176672862 ns/iter 3.7881058860927483 ns/iter 1.12
JSON_String_Key_Hash/100 16.6533172991992 ns/iter 16.610982031622452 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.7828588169640045 ns/iter 3.7829126718161423 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.791149278944508 ns/iter 3.784009278957257 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.781409993246623 ns/iter 3.773240886119307 ns/iter 1.00
Pointer_Object_Traverse 39.51277429440625 ns/iter 40.24177330680911 ns/iter 0.98
Pointer_Object_Try_Traverse 52.497857142859466 ns/iter 49.17535154408363 ns/iter 1.07
Pointer_Push_Back_Pointer_To_Weak_Pointer 176.75856987223952 ns/iter 171.22579048388164 ns/iter 1.03
Pointer_Walker_Schema_ISO_Language 11694787.500001524 ns/iter 11761576.785711927 ns/iter 0.99
Pointer_Maybe_Tracked_Deeply_Nested/0 2016524.7491639513 ns/iter 2064039.7727273658 ns/iter 0.98
Pointer_Maybe_Tracked_Deeply_Nested/1 3186141.9642861425 ns/iter 3197116.964285231 ns/iter 1.00
Pointer_Position_Tracker_Get_Deeply_Nested 620.5184151785963 ns/iter 607.7598214285931 ns/iter 1.02
Schema_Frame_WoT_References 9826854.687499775 ns/iter 10662916.000001132 ns/iter 0.92
Schema_Frame_OMC_References 43653073.333340816 ns/iter 42641641.176474236 ns/iter 1.02
Schema_Frame_OMC_Locations 38955883.33333914 ns/iter 39610864.705884844 ns/iter 0.98
Schema_Frame_ISO_Language_Locations 191244700.00002703 ns/iter 188484466.6665989 ns/iter 1.01
Schema_Frame_KrakenD_References 89806342.85714066 ns/iter 88290842.8571422 ns/iter 1.02
Schema_Frame_KrakenD_Reachable 516090200.0002352 ns/iter 507914099.9998799 ns/iter 1.02
Schema_Iterator_ISO_Language 6343234.821427147 ns/iter 6331766.071428189 ns/iter 1.00
Schema_Frame_ISO_Language_Locations_To_JSON 283233600.00001687 ns/iter 288324550.0000839 ns/iter 0.98
Schema_Tracker_ISO_Language 16360707.317073496 ns/iter 16213688.888890626 ns/iter 1.01
Schema_Tracker_ISO_Language_To_JSON 49140899.9999976 ns/iter 47842978.571436234 ns/iter 1.03
Schema_Format_ISO_Language_To_JSON 190367500.0000173 ns/iter 187645700.00007555 ns/iter 1.01
Schema_Bundle_Meta_2020_12 2895547.0339059564 ns/iter 2887984.3220396405 ns/iter 1.00
Schema_Frame_Many_Resources_References 1489329699.999871 ns/iter 1488955099.9998846 ns/iter 1.00
EditorSchema_ForEditor_EmbeddedResources 28898791.666639075 ns/iter 27927270.83330722 ns/iter 1.03
URITemplateRouter_Create 24251.06304617175 ns/iter 25077.88214285256 ns/iter 0.97
URITemplateRouter_Match 215.07546875000116 ns/iter 213.66687499998704 ns/iter 1.01
URITemplateRouter_Match_BasePath 249.73553571434033 ns/iter 246.52935714292263 ns/iter 1.01
URITemplateRouterView_Restore 30678.316964280075 ns/iter 31085.879464285426 ns/iter 0.99
URITemplateRouterView_Match 149.68113839286852 ns/iter 168.89615793715828 ns/iter 0.89
URITemplateRouterView_Match_BasePath 174.74340902300625 ns/iter 195.85471223860617 ns/iter 0.89
URITemplateRouterView_Arguments 454.1027868475966 ns/iter 446.7931166864724 ns/iter 1.02
JSONL_Parse_Large 28039135.999997597 ns/iter 28207704.00000583 ns/iter 0.99
JSONL_Parse_Large_GZIP 27820192.307689674 ns/iter 28148661.538466513 ns/iter 0.99
HTML_Build_Table_100000 85816333.3333424 ns/iter 87112628.57143864 ns/iter 0.99
HTML_Render_Table_100000 7471012.222223787 ns/iter 7890578.888890963 ns/iter 0.95

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: 67d584f Previous: 19439f7 Ratio
HTML_Build_Table_100000 62200181.2727252 ns/iter 68487878.90000948 ns/iter 0.91
HTML_Render_Table_100000 5232126.526314979 ns/iter 4814105.972414398 ns/iter 1.09
JSONL_Parse_Large 13336121.307693597 ns/iter 12594879.124999838 ns/iter 1.06
JSONL_Parse_Large_GZIP 14480174.145830914 ns/iter 13769779.372550523 ns/iter 1.05
URITemplateRouter_Create 18036.378434045557 ns/iter 17305.822361572336 ns/iter 1.04
URITemplateRouter_Match 170.33600908109605 ns/iter 170.785471796141 ns/iter 1.00
URITemplateRouter_Match_BasePath 186.29584789455407 ns/iter 201.43356302074147 ns/iter 0.92
URITemplateRouterView_Restore 6787.8019723324305 ns/iter 6391.83078628604 ns/iter 1.06
URITemplateRouterView_Match 138.40886658967284 ns/iter 128.2562754478083 ns/iter 1.08
URITemplateRouterView_Match_BasePath 148.99018694363127 ns/iter 147.62296269438966 ns/iter 1.01
URITemplateRouterView_Arguments 463.5239734489375 ns/iter 479.76150769724825 ns/iter 0.97
EditorSchema_ForEditor_EmbeddedResources 13961048.960004518 ns/iter 14084061.12000648 ns/iter 0.99
Schema_Frame_WoT_References 5415866.596898247 ns/iter 5559324.214284551 ns/iter 0.97
Schema_Frame_OMC_References 21880939.124997668 ns/iter 23063953.870962817 ns/iter 0.95
Schema_Frame_OMC_Locations 20287917.371427156 ns/iter 21155616.242422737 ns/iter 0.96
Schema_Frame_ISO_Language_Locations 97349507.71426806 ns/iter 100695667.16667092 ns/iter 0.97
Schema_Frame_KrakenD_References 38362266.999999724 ns/iter 42865351.5882348 ns/iter 0.89
Schema_Frame_KrakenD_Reachable 504666177.9997521 ns/iter 561321718.0000447 ns/iter 0.90
Schema_Iterator_ISO_Language 3223823.8888885044 ns/iter 3160557.7747748136 ns/iter 1.02
Schema_Frame_ISO_Language_Locations_To_JSON 215797634.33328483 ns/iter 233879058.66669217 ns/iter 0.92
Schema_Tracker_ISO_Language 4860734.1875010785 ns/iter 4673321.885905004 ns/iter 1.04
Schema_Tracker_ISO_Language_To_JSON 22906572.366673574 ns/iter 22115706.46875316 ns/iter 1.04
Schema_Format_ISO_Language_To_JSON 103709601.7143345 ns/iter 109572322.57140146 ns/iter 0.95
Schema_Bundle_Meta_2020_12 1819395.104440011 ns/iter 1820245.7272722807 ns/iter 1.00
Schema_Frame_Many_Resources_References 365218920.49995583 ns/iter 377377154.99997646 ns/iter 0.97
Pointer_Object_Traverse 28.807173073780117 ns/iter 26.729795738235406 ns/iter 1.08
Pointer_Object_Try_Traverse 19.960732990457018 ns/iter 22.34753826612735 ns/iter 0.89
Pointer_Push_Back_Pointer_To_Weak_Pointer 160.72541724618455 ns/iter 179.39477737142397 ns/iter 0.90
Pointer_Walker_Schema_ISO_Language 3302073.8578207344 ns/iter 3616787.9792737197 ns/iter 0.91
Pointer_Maybe_Tracked_Deeply_Nested/0 1550588.4687497332 ns/iter 1545926.391592963 ns/iter 1.00
Pointer_Maybe_Tracked_Deeply_Nested/1 1759129.5789471064 ns/iter 1775246.788804423 ns/iter 0.99
Pointer_Position_Tracker_Get_Deeply_Nested 431.8192905845439 ns/iter 450.741979246584 ns/iter 0.96
JSON_Array_Of_Objects_Unique 405.92987249013754 ns/iter 421.92465196645344 ns/iter 0.96
JSON_Parse_1 7939.58825925921 ns/iter 7758.089600018452 ns/iter 1.02
JSON_Parse_Real 12328.14765254184 ns/iter 11967.885256000622 ns/iter 1.03
JSON_Parse_Decimal 17981.586735217144 ns/iter 16391.546226945862 ns/iter 1.10
JSON_Parse_Schema_ISO_Language 4751712.027209763 ns/iter 4598450.125000322 ns/iter 1.03
JSON_Fast_Hash_Helm_Chart_Lock 71.70061634079937 ns/iter 56.05544246047678 ns/iter 1.28
JSON_Equality_Helm_Chart_Lock 168.30361259635376 ns/iter 180.96882663765612 ns/iter 0.93
JSON_Divisible_By_Decimal 240.01180264432122 ns/iter 234.5204421885001 ns/iter 1.02
JSON_String_Equal/10 6.778996105406156 ns/iter 6.796213729069296 ns/iter 1.00
JSON_String_Equal/100 7.424110482700336 ns/iter 7.547506613266462 ns/iter 0.98
JSON_String_Equal_Small_By_Perfect_Hash/10 0.7397870931859567 ns/iter 0.7107363824352817 ns/iter 1.04
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 25.21517642236769 ns/iter 22.0026651195755 ns/iter 1.15
JSON_String_Fast_Hash/10 0.9343948522090579 ns/iter 1.7603524296637485 ns/iter 0.53
JSON_String_Fast_Hash/100 0.9375008811000072 ns/iter 1.7653003383650585 ns/iter 0.53
JSON_String_Key_Hash/10 1.246741391373887 ns/iter 1.0884330825976902 ns/iter 1.15
JSON_String_Key_Hash/100 12.443471853126901 ns/iter 14.760458900173274 ns/iter 0.84
JSON_Object_Defines_Miss_Same_Length 3.113991935702315 ns/iter 3.5215950520037995 ns/iter 0.88
JSON_Object_Defines_Miss_Too_Small 3.1135684283293608 ns/iter 3.5181018472532597 ns/iter 0.89
JSON_Object_Defines_Miss_Too_Large 3.4243121961765617 ns/iter 3.5326689269264993 ns/iter 0.97
Regex_Lower_S_Or_Upper_S_Asterisk 0.9413572937765279 ns/iter 1.4082661185707912 ns/iter 0.67
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.6227774978571196 ns/iter 1.4118728166897185 ns/iter 0.44
Regex_Period_Asterisk 0.6229212730571901 ns/iter 1.4073480647871197 ns/iter 0.44
Regex_Group_Period_Asterisk_Group 0.9340135676462101 ns/iter 1.7586005693285895 ns/iter 0.53
Regex_Period_Plus 0.9389738777304494 ns/iter 1.407602394775386 ns/iter 0.67
Regex_Period 0.6222765123634968 ns/iter 1.4083413179080189 ns/iter 0.44
Regex_Caret_Period_Plus_Dollar 0.6227709714142475 ns/iter 1.4075490102775117 ns/iter 0.44
Regex_Caret_Group_Period_Plus_Group_Dollar 0.934496295844793 ns/iter 1.407966931536607 ns/iter 0.66
Regex_Caret_Period_Asterisk_Dollar 0.9345628402211315 ns/iter 1.766086863288653 ns/iter 0.53
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.6225587668886157 ns/iter 1.759990060734026 ns/iter 0.35
Regex_Caret_X_Hyphen 4.050498397833834 ns/iter 11.599755482025069 ns/iter 0.35
Regex_Period_Md_Dollar 30.09009553882682 ns/iter 33.63735416829687 ns/iter 0.89
Regex_Caret_Slash_Period_Asterisk 4.360644989281605 ns/iter 4.927403814561232 ns/iter 0.88
Regex_Caret_Period_Range_Dollar 0.7788790096682361 ns/iter 1.7601199119110962 ns/iter 0.44
Regex_Nested_Backtrack 37.15209038627324 ns/iter 50.048712071093696 ns/iter 0.74

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

@jviotti jviotti merged commit b267bc8 into main May 8, 2026
13 checks passed
@jviotti jviotti deleted the string-view-apis branch May 8, 2026 16:57
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