Skip to content

Implement a utility to validate BCP 47 language tags#2537

Merged
jviotti merged 2 commits into
mainfrom
langtag
Jun 24, 2026
Merged

Implement a utility to validate BCP 47 language tags#2537
jviotti merged 2 commits into
mainfrom
langtag

Conversation

@jviotti

@jviotti jviotti commented Jun 23, 2026

Copy link
Copy Markdown
Member

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

Review in cubic

@augmentcode

augmentcode Bot commented Jun 23, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR introduces a new langtag Core component that validates BCP 47 / RFC 5646 language tags.

Changes:

  • Added a new build option SOURCEMETA_CORE_LANGTAG and wired it into the top-level build and test CMake configuration.
  • Registered langtag as a default exportable component in config.cmake.in for downstream consumers.
  • Added a new sourcemeta::core::is_langtag(std::string_view) API and implementation using a single-pass hyphen-subtag parser.
  • Implemented duplicate detection for variant subtags and extension singletons (case-insensitive), per RFC 5646 structural constraints.
  • Added explicit handling for RFC 5646 “irregular grandfathered” tags.
  • Added a focused GoogleTest suite covering RFC examples and key negative cases (trailing hyphens, duplicate variants/singletons, malformed extensions).
  • Updated website build/deploy workflows to disable the new component in those CI jobs.

Technical Notes: The validator checks structural well-formedness (grammar + duplication rules) but intentionally does not consult the IANA Language Subtag Registry for registration validity.

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

@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 9 files

Re-trigger cubic

@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: 6eb9721 Previous: 1c13a82 Ratio
JOSE_VerifySignature_RS256 22005.701591133944 ns/iter 24553.049790449935 ns/iter 0.90
JOSE_VerifySignature_ES512 575950.7837171297 ns/iter 641221.535714324 ns/iter 0.90
GZIP_Compress_ISO_Language_Set_3_Locations 36259858.10526201 ns/iter 39328236.05555313 ns/iter 0.92
GZIP_Decompress_ISO_Language_Set_3_Locations 4113991.2352939653 ns/iter 4071111.1802324443 ns/iter 1.01
GZIP_Compress_ISO_Language_Set_3_Schema 2012840.3275860876 ns/iter 2282154.0457514296 ns/iter 0.88
GZIP_Decompress_ISO_Language_Set_3_Schema 375761.0514745421 ns/iter 277444.5753370502 ns/iter 1.35
HTML_Build_Table_100000 60228779.363631636 ns/iter 72356648.40000026 ns/iter 0.83
HTML_Render_Table_100000 1983616.3467743362 ns/iter 2135655.162079408 ns/iter 0.93
JSONL_Parse_Large 12851091.68518543 ns/iter 12200391.824561402 ns/iter 1.05
JSONL_Parse_Large_GZIP 14212008.306121882 ns/iter 13777766.235293979 ns/iter 1.03
URITemplateRouter_Create 30878.78376234578 ns/iter 29349.48800637171 ns/iter 1.05
URITemplateRouter_Match 155.08612522342557 ns/iter 152.02354863897986 ns/iter 1.02
URITemplateRouter_Match_BasePath 182.00937242416583 ns/iter 178.1789830513586 ns/iter 1.02
URITemplateRouterView_Restore 7588.5378448032 ns/iter 8832.889955858209 ns/iter 0.86
URITemplateRouterView_Match 125.72323657667052 ns/iter 126.72965137550015 ns/iter 0.99
URITemplateRouterView_Match_BasePath 142.46532382840434 ns/iter 142.4996768958508 ns/iter 1.00
URITemplateRouterView_Arguments 468.58100330080066 ns/iter 456.37298225396813 ns/iter 1.03
Pointer_Object_Traverse 28.27993643339904 ns/iter 29.887471624482902 ns/iter 0.95
Pointer_Object_Try_Traverse 23.419847327477736 ns/iter 24.97497233822011 ns/iter 0.94
Pointer_Push_Back_Pointer_To_Weak_Pointer 162.05717531141525 ns/iter 176.4777387105206 ns/iter 0.92
Pointer_Walker_Schema_ISO_Language 1846894.6464381134 ns/iter 1943993.5434782242 ns/iter 0.95
Pointer_Maybe_Tracked_Deeply_Nested/0 1538893.4945054485 ns/iter 1542146.6225164558 ns/iter 1.00
Pointer_Maybe_Tracked_Deeply_Nested/1 1697001.559036068 ns/iter 1661143.0284359774 ns/iter 1.02
Pointer_Position_Tracker_Get_Deeply_Nested 554.7376471600644 ns/iter 569.5565070402155 ns/iter 0.97
JSON_Array_Of_Objects_Unique 395.46164861424637 ns/iter 427.0937768222908 ns/iter 0.93
JSON_Parse_1 7551.12426711594 ns/iter 7555.744948623552 ns/iter 1.00
JSON_Parse_Real 6668.682643461835 ns/iter 6516.622200160448 ns/iter 1.02
JSON_Parse_Decimal 11442.014704918434 ns/iter 9567.392441940749 ns/iter 1.20
JSON_Parse_Schema_ISO_Language 5072511.919707642 ns/iter 5068763.311594532 ns/iter 1.00
JSON_Parse_Integer 4884.585443280564 ns/iter 4871.950525071457 ns/iter 1.00
JSON_Parse_String_NonSSO_Plain 8646.822766836773 ns/iter 8612.41801984838 ns/iter 1.00
JSON_Parse_String_SSO_Plain 4018.480020447613 ns/iter 3686.9855103724367 ns/iter 1.09
JSON_Parse_String_Escape_Heavy 20944.856223045754 ns/iter 19976.566737738653 ns/iter 1.05
JSON_Parse_Object_Short_Keys 11080.17098060366 ns/iter 11366.390440316356 ns/iter 0.97
JSON_Parse_Object_Scalar_Properties 7000.525574373519 ns/iter 5796.504076233987 ns/iter 1.21
JSON_Parse_Object_Array_Properties 10440.119310773167 ns/iter 8996.669280013652 ns/iter 1.16
JSON_Parse_Object_Object_Properties 10601.808175575878 ns/iter 9368.405476938515 ns/iter 1.13
JSON_Parse_Nested_Containers 72393.16289873287 ns/iter 72451.82528807386 ns/iter 1.00
JSON_From_String_Copy 18.21856725664984 ns/iter 20.02747013803188 ns/iter 0.91
JSON_From_String_Temporary 15.35491893676634 ns/iter 16.28625061713057 ns/iter 0.94
JSON_Number_To_Double 20.724863793126538 ns/iter 19.361916355096408 ns/iter 1.07
JSON_Object_At_Last_Key/8 8.10302828443942 ns/iter 9.142696829144256 ns/iter 0.89
JSON_Object_At_Last_Key/32 31.500187791427102 ns/iter 34.450213414331785 ns/iter 0.91
JSON_Object_At_Last_Key/128 127.44845216581632 ns/iter 135.88545751794726 ns/iter 0.94
JSON_Object_At_Last_Key/512 517.2520528364802 ns/iter 559.9597023025203 ns/iter 0.92
JSON_Fast_Hash_Helm_Chart_Lock 61.51890505625016 ns/iter 62.03596180748372 ns/iter 0.99
JSON_Equality_Helm_Chart_Lock 157.0141314564112 ns/iter 158.90119355491495 ns/iter 0.99
JSON_Divisible_By_Decimal 241.11822759146247 ns/iter 231.7080740844014 ns/iter 1.04
JSON_String_Equal/10 6.310824451825393 ns/iter 6.079944788738624 ns/iter 1.04
JSON_String_Equal/100 6.9342618632426705 ns/iter 6.773771798061843 ns/iter 1.02
JSON_String_Equal_Small_By_Perfect_Hash/10 0.6236773551627769 ns/iter 0.7117716270284438 ns/iter 0.88
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 25.201045968292625 ns/iter 21.970564165187355 ns/iter 1.15
JSON_String_Fast_Hash/10 1.2461797453467123 ns/iter 1.407581547451502 ns/iter 0.89
JSON_String_Fast_Hash/100 1.2555706955949348 ns/iter 1.4076719724325228 ns/iter 0.89
JSON_String_Key_Hash/10 1.246548115754851 ns/iter 1.0867093256486426 ns/iter 1.15
JSON_String_Key_Hash/100 12.444485725651212 ns/iter 15.114382675952976 ns/iter 0.82
JSON_Object_Defines_Miss_Same_Length 3.112389245342063 ns/iter 3.516438731036995 ns/iter 0.89
JSON_Object_Defines_Miss_Too_Small 3.1145875736087465 ns/iter 3.5463324021956772 ns/iter 0.88
JSON_Object_Defines_Miss_Too_Large 3.426358133707709 ns/iter 3.871290778820188 ns/iter 0.89
Regex_Lower_S_Or_Upper_S_Asterisk 0.6251833016004822 ns/iter 0.7040053201553644 ns/iter 0.89
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.9346213685190796 ns/iter 1.0555402017544238 ns/iter 0.89
Regex_Period_Asterisk 0.9348346053899835 ns/iter 1.0567010406281612 ns/iter 0.88
Regex_Group_Period_Asterisk_Group 0.6229304505649007 ns/iter 0.7033637810849592 ns/iter 0.89
Regex_Period_Plus 0.6237250059832177 ns/iter 0.7036959735874917 ns/iter 0.89
Regex_Period 0.9418535893529808 ns/iter 1.0564350404647305 ns/iter 0.89
Regex_Caret_Period_Plus_Dollar 0.938439715730778 ns/iter 1.055311976427075 ns/iter 0.89
Regex_Caret_Group_Period_Plus_Group_Dollar 0.6231880300481047 ns/iter 0.7043655691544036 ns/iter 0.88
Regex_Caret_Period_Asterisk_Dollar 0.6249349093666349 ns/iter 0.7042446318125851 ns/iter 0.89
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.9344198152097531 ns/iter 1.0553748391102433 ns/iter 0.89
Regex_Caret_X_Hyphen 4.054050171410412 ns/iter 3.8692606574656185 ns/iter 1.05
Regex_Period_Md_Dollar 30.589092148675615 ns/iter 32.91519435407627 ns/iter 0.93
Regex_Caret_Slash_Period_Asterisk 4.357823785108652 ns/iter 4.221450881327155 ns/iter 1.03
Regex_Caret_Period_Range_Dollar 1.2452335632758207 ns/iter 1.4070990098559082 ns/iter 0.88
Regex_Nested_Backtrack 38.448821317878675 ns/iter 38.262861018565566 ns/iter 1.00

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.

1 issue found across 9 files (changes from recent commits).

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

Re-trigger cubic

Comment thread test/text/text_is_alphanum_test.cc

@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: 6eb9721 Previous: 1c13a82 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.6123298609190881 ns/iter 1.7190973892604249 ns/iter 0.94
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.5744908274085365 ns/iter 1.950414935079088 ns/iter 0.81
Regex_Period_Asterisk 1.6628296529758715 ns/iter 1.8566291533847112 ns/iter 0.90
Regex_Group_Period_Asterisk_Group 1.6567842791960576 ns/iter 1.7846154688362907 ns/iter 0.93
Regex_Period_Plus 2.0119167903881205 ns/iter 2.17660082068817 ns/iter 0.92
Regex_Period 2.0734459751745127 ns/iter 2.118779146291268 ns/iter 0.98
Regex_Caret_Period_Plus_Dollar 2.0983172759001527 ns/iter 2.088453932571365 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 2.2787130996731437 ns/iter 2.073816158038872 ns/iter 1.10
Regex_Caret_Period_Asterisk_Dollar 2.0334458178155876 ns/iter 1.8640339039110327 ns/iter 1.09
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.9102275860350764 ns/iter 1.736680943262737 ns/iter 1.10
Regex_Caret_X_Hyphen 6.968544762495737 ns/iter 6.1895960891423085 ns/iter 1.13
Regex_Period_Md_Dollar 20.689507153043056 ns/iter 18.60032533798119 ns/iter 1.11
Regex_Caret_Slash_Period_Asterisk 4.6079957320798055 ns/iter 5.263462499999605 ns/iter 0.88
Regex_Caret_Period_Range_Dollar 2.3315890247898357 ns/iter 2.0850125311261882 ns/iter 1.12
Regex_Nested_Backtrack 37.8519995659339 ns/iter 25.324314273655556 ns/iter 1.49
JSON_Array_Of_Objects_Unique 531.1298464304615 ns/iter 340.3549255815058 ns/iter 1.56
JSON_Parse_1 4241.528373388437 ns/iter 3752.550413265922 ns/iter 1.13
JSON_Parse_Real 5603.985588340739 ns/iter 5279.949423536338 ns/iter 1.06
JSON_Parse_Decimal 5786.928927308285 ns/iter 5615.02246334845 ns/iter 1.03
JSON_Parse_Schema_ISO_Language 3825251.2462690906 ns/iter 2794487.591489164 ns/iter 1.37
JSON_Parse_Integer 2888.1717172980825 ns/iter 2999.360606112497 ns/iter 0.96
JSON_Parse_String_NonSSO_Plain 3505.9952818161228 ns/iter 3511.4621323347733 ns/iter 1.00
JSON_Parse_String_SSO_Plain 1742.9310172359342 ns/iter 1769.8680846049883 ns/iter 0.98
JSON_Parse_String_Escape_Heavy 16740.525399130045 ns/iter 16350.440962845214 ns/iter 1.02
JSON_Parse_Object_Short_Keys 6390.5090364334965 ns/iter 5213.009546082925 ns/iter 1.23
JSON_Parse_Object_Scalar_Properties 2784.3675920711557 ns/iter 2738.162778313357 ns/iter 1.02
JSON_Parse_Object_Array_Properties 4595.061588614191 ns/iter 3425.485385997293 ns/iter 1.34
JSON_Parse_Object_Object_Properties 4568.658045353312 ns/iter 3491.833315024797 ns/iter 1.31
JSON_Parse_Nested_Containers 28749.67752522316 ns/iter 27567.97373395253 ns/iter 1.04
JSON_From_String_Copy 24.80330639479057 ns/iter 24.30329436784326 ns/iter 1.02
JSON_From_String_Temporary 19.523951132336325 ns/iter 19.44961255815664 ns/iter 1.00
JSON_Number_To_Double 31.575591319091508 ns/iter 33.109923764650134 ns/iter 0.95
JSON_Object_At_Last_Key/8 3.514429199200057 ns/iter 3.72123966384162 ns/iter 0.94
JSON_Object_At_Last_Key/32 11.635260563336105 ns/iter 11.809498471849754 ns/iter 0.99
JSON_Object_At_Last_Key/128 54.909830943109164 ns/iter 54.52314512420092 ns/iter 1.01
JSON_Object_At_Last_Key/512 189.18154456050976 ns/iter 199.77890299985958 ns/iter 0.95
JSON_Fast_Hash_Helm_Chart_Lock 60.278048976896294 ns/iter 58.46017920044582 ns/iter 1.03
JSON_Equality_Helm_Chart_Lock 128.21319608286322 ns/iter 133.14252777653246 ns/iter 0.96
JSON_Divisible_By_Decimal 181.90093550974083 ns/iter 174.11088851111143 ns/iter 1.04
JSON_String_Equal/10 6.585169407636473 ns/iter 6.73121856358899 ns/iter 0.98
JSON_String_Equal/100 6.547370788994773 ns/iter 6.438459574533191 ns/iter 1.02
JSON_String_Equal_Small_By_Perfect_Hash/10 0.8023696914439105 ns/iter 0.7545648316990872 ns/iter 1.06
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.2361119033106855 ns/iter 3.30018432917659 ns/iter 0.98
JSON_String_Fast_Hash/10 2.3318974892852222 ns/iter 2.351078118144742 ns/iter 0.99
JSON_String_Fast_Hash/100 1.979937979285358 ns/iter 2.0375072807655736 ns/iter 0.97
JSON_String_Key_Hash/10 1.3176408949864045 ns/iter 1.3450451016400444 ns/iter 0.98
JSON_String_Key_Hash/100 2.1923580537346523 ns/iter 2.112827382171954 ns/iter 1.04
JSON_Object_Defines_Miss_Same_Length 2.2417015504365287 ns/iter 2.362848105896588 ns/iter 0.95
JSON_Object_Defines_Miss_Too_Small 2.417799244603197 ns/iter 2.3617947659709038 ns/iter 1.02
JSON_Object_Defines_Miss_Too_Large 2.4277778633085383 ns/iter 2.390633092975828 ns/iter 1.02
Pointer_Object_Traverse 13.8798159953619 ns/iter 13.783326724230474 ns/iter 1.01
Pointer_Object_Try_Traverse 21.57147232658905 ns/iter 22.54863345667032 ns/iter 0.96
Pointer_Push_Back_Pointer_To_Weak_Pointer 154.0752861427362 ns/iter 154.93619174620244 ns/iter 0.99
Pointer_Walker_Schema_ISO_Language 2430214.9534247443 ns/iter 2178717.7492258963 ns/iter 1.12
Pointer_Maybe_Tracked_Deeply_Nested/0 872835.0706836272 ns/iter 888326.755201968 ns/iter 0.98
Pointer_Maybe_Tracked_Deeply_Nested/1 1369588.1801125428 ns/iter 1156521.1038960381 ns/iter 1.18
Pointer_Position_Tracker_Get_Deeply_Nested 343.16277389588936 ns/iter 353.17060803173916 ns/iter 0.97
URITemplateRouter_Create 23372.01147344874 ns/iter 22875.508648682742 ns/iter 1.02
URITemplateRouter_Match 171.54427655968522 ns/iter 163.4772859626087 ns/iter 1.05
URITemplateRouter_Match_BasePath 247.09165116681783 ns/iter 191.63143808760842 ns/iter 1.29
URITemplateRouterView_Restore 11571.09141825618 ns/iter 9154.698088393192 ns/iter 1.26
URITemplateRouterView_Match 143.080528938949 ns/iter 129.19080848707344 ns/iter 1.11
URITemplateRouterView_Match_BasePath 207.81535609547512 ns/iter 145.8745713724386 ns/iter 1.42
URITemplateRouterView_Arguments 463.1822245442235 ns/iter 403.72069236998556 ns/iter 1.15
JSONL_Parse_Large 13509716.509802543 ns/iter 12130628.66666828 ns/iter 1.11
JSONL_Parse_Large_GZIP 15358318.020408122 ns/iter 13368091.188679174 ns/iter 1.15
HTML_Build_Table_100000 72420108.30000255 ns/iter 61703819.44444772 ns/iter 1.17
HTML_Render_Table_100000 4672253.326086742 ns/iter 2994990.8756216066 ns/iter 1.56
GZIP_Compress_ISO_Language_Set_3_Locations 31653999.999998633 ns/iter 28203546.500002664 ns/iter 1.12
GZIP_Decompress_ISO_Language_Set_3_Locations 6011303.959015832 ns/iter 5287731.229007734 ns/iter 1.14
GZIP_Compress_ISO_Language_Set_3_Schema 1549583.3340708534 ns/iter 1496212.833693324 ns/iter 1.04
GZIP_Decompress_ISO_Language_Set_3_Schema 323794.36427456985 ns/iter 278191.5176938417 ns/iter 1.16
JOSE_VerifySignature_RS256 24642.56183054121 ns/iter 21237.922850447972 ns/iter 1.16
JOSE_VerifySignature_ES512 1204549.4828711983 ns/iter 980449.5460893167 ns/iter 1.23

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: 6eb9721 Previous: 1c13a82 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.4838649601080567 ns/iter 2.231494004953457 ns/iter 1.11
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.4622995339159996 ns/iter 2.180453232499876 ns/iter 1.13
Regex_Period_Asterisk 2.4615814703517365 ns/iter 2.181201809579396 ns/iter 1.13
Regex_Group_Period_Asterisk_Group 2.463336347095806 ns/iter 2.187733888758547 ns/iter 1.13
Regex_Period_Plus 3.515210244555553 ns/iter 2.4904499021098436 ns/iter 1.41
Regex_Period 3.515545478122998 ns/iter 2.490658706131269 ns/iter 1.41
Regex_Caret_Period_Plus_Dollar 3.8682606328674636 ns/iter 2.8025208859163904 ns/iter 1.38
Regex_Caret_Group_Period_Plus_Group_Dollar 3.873467121747244 ns/iter 2.803686084065931 ns/iter 1.38
Regex_Caret_Period_Asterisk_Dollar 2.4612644870601463 ns/iter 3.1170874513267446 ns/iter 0.79
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.4632102644672953 ns/iter 2.6776149679492125 ns/iter 0.92
Regex_Caret_X_Hyphen 7.031108618641623 ns/iter 5.948757032313674 ns/iter 1.18
Regex_Period_Md_Dollar 26.652579121214842 ns/iter 27.550532783741996 ns/iter 0.97
Regex_Caret_Slash_Period_Asterisk 7.291627134021657 ns/iter 5.917700284033628 ns/iter 1.23
Regex_Caret_Period_Range_Dollar 2.4638668065757194 ns/iter 3.7349078480238576 ns/iter 0.66
Regex_Nested_Backtrack 37.15052492604508 ns/iter 48.01945660000203 ns/iter 0.77
JSON_Array_Of_Objects_Unique 442.4797218079824 ns/iter 405.3314510165266 ns/iter 1.09
JSON_Parse_1 4748.591847083893 ns/iter 4871.959537612414 ns/iter 0.97
JSON_Parse_Real 5291.210887517698 ns/iter 5360.088533753304 ns/iter 0.99
JSON_Parse_Decimal 7616.285103373127 ns/iter 7687.15712957435 ns/iter 0.99
JSON_Parse_Schema_ISO_Language 3614484.43076871 ns/iter 3418285.6048784475 ns/iter 1.06
JSON_Parse_Integer 4044.3842626586998 ns/iter 3969.8959990500794 ns/iter 1.02
JSON_Parse_String_NonSSO_Plain 5052.812056737615 ns/iter 5213.621829999511 ns/iter 0.97
JSON_Parse_String_SSO_Plain 2831.7903312517374 ns/iter 2780.3379451745914 ns/iter 1.02
JSON_Parse_String_Escape_Heavy 14191.11333522456 ns/iter 14838.686309427707 ns/iter 0.96
JSON_Parse_Object_Short_Keys 8104.662016832412 ns/iter 10576.175948853575 ns/iter 0.77
JSON_Parse_Object_Scalar_Properties 4102.226040811492 ns/iter 4114.340505101238 ns/iter 1.00
JSON_Parse_Object_Array_Properties 5578.588945880343 ns/iter 5768.483800389299 ns/iter 0.97
JSON_Parse_Object_Object_Properties 5623.316718087025 ns/iter 5472.915230459742 ns/iter 1.03
JSON_Parse_Nested_Containers 44989.30926772103 ns/iter 44769.91040407365 ns/iter 1.00
JSON_From_String_Copy 21.46037942706369 ns/iter 20.458501899168766 ns/iter 1.05
JSON_From_String_Temporary 17.952761312925723 ns/iter 17.149762100349488 ns/iter 1.05
JSON_Number_To_Double 22.501559055190967 ns/iter 24.18478883843103 ns/iter 0.93
JSON_Object_At_Last_Key/8 4.697918363862732 ns/iter 3.4915487901421476 ns/iter 1.35
JSON_Object_At_Last_Key/32 13.572622749517413 ns/iter 11.929508253234951 ns/iter 1.14
JSON_Object_At_Last_Key/128 47.30376184350085 ns/iter 49.18311157815164 ns/iter 0.96
JSON_Object_At_Last_Key/512 365.69272084918134 ns/iter 383.5755285067264 ns/iter 0.95
JSON_Fast_Hash_Helm_Chart_Lock 68.62032493305878 ns/iter 56.70992194679584 ns/iter 1.21
JSON_Equality_Helm_Chart_Lock 181.6456442166595 ns/iter 170.68306106090915 ns/iter 1.06
JSON_Divisible_By_Decimal 253.92509959666128 ns/iter 254.62146892241975 ns/iter 1.00
JSON_String_Equal/10 6.68201162433299 ns/iter 7.80353909959372 ns/iter 0.86
JSON_String_Equal/100 7.3943215829616245 ns/iter 7.483467935541507 ns/iter 0.99
JSON_String_Equal_Small_By_Perfect_Hash/10 1.0545725981412104 ns/iter 0.9379300398811226 ns/iter 1.12
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 12.408379131741071 ns/iter 14.939294799083717 ns/iter 0.83
JSON_String_Fast_Hash/10 2.1126550855968653 ns/iter 2.180507245197774 ns/iter 0.97
JSON_String_Fast_Hash/100 2.1122782104339 ns/iter 2.179359682367041 ns/iter 0.97
JSON_String_Key_Hash/10 2.4666144894754702 ns/iter 2.737215604622972 ns/iter 0.90
JSON_String_Key_Hash/100 7.741706503875638 ns/iter 9.026722173972017 ns/iter 0.86
JSON_Object_Defines_Miss_Same_Length 2.893735631183144 ns/iter 2.687329612167115 ns/iter 1.08
JSON_Object_Defines_Miss_Too_Small 2.948096961117306 ns/iter 2.5623406907204327 ns/iter 1.15
JSON_Object_Defines_Miss_Too_Large 2.9600658168263925 ns/iter 2.6006004339526165 ns/iter 1.14
Pointer_Object_Traverse 25.525082106257294 ns/iter 24.108204040611174 ns/iter 1.06
Pointer_Object_Try_Traverse 30.582704589829873 ns/iter 29.87023760505317 ns/iter 1.02
Pointer_Push_Back_Pointer_To_Weak_Pointer 183.5624412361908 ns/iter 211.9495659465546 ns/iter 0.87
Pointer_Walker_Schema_ISO_Language 1773517.7277355888 ns/iter 1732435.0074442725 ns/iter 1.02
Pointer_Maybe_Tracked_Deeply_Nested/0 1282991.161410125 ns/iter 1230923.281138742 ns/iter 1.04
Pointer_Maybe_Tracked_Deeply_Nested/1 1875278.4611651185 ns/iter 1765767.428211518 ns/iter 1.06
Pointer_Position_Tracker_Get_Deeply_Nested 748.2734602047092 ns/iter 690.8870226732787 ns/iter 1.08
URITemplateRouter_Create 30838.14282585129 ns/iter 31530.11415195952 ns/iter 0.98
URITemplateRouter_Match 178.39483693121105 ns/iter 179.40352531453104 ns/iter 0.99
URITemplateRouter_Match_BasePath 214.09165395113922 ns/iter 206.2754736859537 ns/iter 1.04
URITemplateRouterView_Restore 8680.549343974364 ns/iter 7623.736392651544 ns/iter 1.14
URITemplateRouterView_Match 172.1247762168904 ns/iter 165.262201090393 ns/iter 1.04
URITemplateRouterView_Match_BasePath 191.57770167642587 ns/iter 188.4065040606352 ns/iter 1.02
URITemplateRouterView_Arguments 450.35575774660094 ns/iter 441.33487157854586 ns/iter 1.02
JSONL_Parse_Large 9387132.486841964 ns/iter 9994477.48571356 ns/iter 0.94
JSONL_Parse_Large_GZIP 11125650.06349267 ns/iter 11538758.606557392 ns/iter 0.96
HTML_Build_Table_100000 72114099.800001 ns/iter 78691660.00000405 ns/iter 0.92
HTML_Render_Table_100000 5045002.835713928 ns/iter 5307224.174602637 ns/iter 0.95
GZIP_Compress_ISO_Language_Set_3_Locations 35444737.89999642 ns/iter 33336950.85714117 ns/iter 1.06
GZIP_Decompress_ISO_Language_Set_3_Locations 4370423.097561215 ns/iter 4036845.884393109 ns/iter 1.08
GZIP_Compress_ISO_Language_Set_3_Schema 2127586.334346457 ns/iter 1884951.1185984213 ns/iter 1.13
GZIP_Decompress_ISO_Language_Set_3_Schema 276439.95571370976 ns/iter 354719.0166920068 ns/iter 0.78
JOSE_VerifySignature_RS256 63988.013062943406 ns/iter 57937.783051688835 ns/iter 1.10
JOSE_VerifySignature_ES512 2663714.276515134 ns/iter 2404078.6632305183 ns/iter 1.11

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Benchmark (windows/msvc)

Details
Benchmark suite Current: 6eb9721 Previous: 1c13a82 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 3.8640835645276104 ns/iter 3.8677500000007723 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.8382907366063534 ns/iter 3.8820680803564045 ns/iter 0.99
Regex_Period_Asterisk 3.8443136160713567 ns/iter 3.8876707589289135 ns/iter 0.99
Regex_Group_Period_Asterisk_Group 3.925631778704546 ns/iter 3.8875959821422463 ns/iter 1.01
Regex_Period_Plus 3.5687980747814416 ns/iter 3.5880775167154297 ns/iter 0.99
Regex_Period 3.5663959311307587 ns/iter 3.6196337220230883 ns/iter 0.99
Regex_Caret_Period_Plus_Dollar 3.567160529343926 ns/iter 3.6168968247060174 ns/iter 0.99
Regex_Caret_Group_Period_Plus_Group_Dollar 3.5680983203176235 ns/iter 3.570401109695642 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 3.855071778829392 ns/iter 3.865678385954119 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.8398071360004082 ns/iter 3.8448577008929976 ns/iter 1.00
Regex_Caret_X_Hyphen 6.042211607144005 ns/iter 6.132533928572619 ns/iter 0.99
Regex_Period_Md_Dollar 52.54924000000756 ns/iter 50.55523000000903 ns/iter 1.04
Regex_Caret_Slash_Period_Asterisk 5.757459821428565 ns/iter 6.3445035714287155 ns/iter 0.91
Regex_Caret_Period_Range_Dollar 4.114258370535901 ns/iter 4.381766527637059 ns/iter 0.94
Regex_Nested_Backtrack 51.920449999988705 ns/iter 53.23762500000028 ns/iter 0.98
JSON_Array_Of_Objects_Unique 413.60583421401344 ns/iter 434.3450624999434 ns/iter 0.95
JSON_Parse_1 7144.561383929065 ns/iter 7186.016741072316 ns/iter 0.99
JSON_Parse_Real 12896.480357142082 ns/iter 12766.31071428775 ns/iter 1.01
JSON_Parse_Decimal 8678.176339285772 ns/iter 8771.651785714088 ns/iter 0.99
JSON_Parse_Schema_ISO_Language 6241922.321428156 ns/iter 6216713.392857644 ns/iter 1.00
JSON_Parse_Integer 4576.311956654379 ns/iter 4618.609814671844 ns/iter 0.99
JSON_Parse_String_NonSSO_Plain 6037.218750001168 ns/iter 5944.339285714965 ns/iter 1.02
JSON_Parse_String_SSO_Plain 2719.243802389419 ns/iter 2745.6856740622675 ns/iter 0.99
JSON_Parse_String_Escape_Heavy 16736.00892857 ns/iter 16341.176339287651 ns/iter 1.02
JSON_Parse_Object_Short_Keys 10066.698809381462 ns/iter 10354.147079698107 ns/iter 0.97
JSON_Parse_Object_Scalar_Properties 5157.111000000896 ns/iter 5184.639000001425 ns/iter 0.99
JSON_Parse_Object_Array_Properties 8844.553818956194 ns/iter 8992.546908272754 ns/iter 0.98
JSON_Parse_Object_Object_Properties 9009.325404796986 ns/iter 9111.424056143054 ns/iter 0.99
JSON_Parse_Nested_Containers 64198.00892857097 ns/iter 63987.40178572179 ns/iter 1.00
JSON_From_String_Copy 48.260142310755 ns/iter 49.908510000000206 ns/iter 0.97
JSON_From_String_Temporary 65.36356249999439 ns/iter 66.78364285714825 ns/iter 0.98
JSON_Number_To_Double 102.26296875000429 ns/iter 106.96926754604048 ns/iter 0.96
JSON_Object_At_Last_Key/8 5.757849107143086 ns/iter 5.7751680000001215 ns/iter 1.00
JSON_Object_At_Last_Key/32 19.141832142858156 ns/iter 20.55247250493301 ns/iter 0.93
JSON_Object_At_Last_Key/128 72.14619642858061 ns/iter 74.39973214284278 ns/iter 0.97
JSON_Object_At_Last_Key/512 331.4828017942794 ns/iter 336.5050369539377 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 54.85719999999219 ns/iter 52.48457142857076 ns/iter 1.05
JSON_Equality_Helm_Chart_Lock 221.6221562500209 ns/iter 250.17178011480354 ns/iter 0.89
JSON_Divisible_By_Decimal 287.4078755621545 ns/iter 286.2694903716868 ns/iter 1.00
JSON_String_Equal/10 10.986026785713777 ns/iter 11.052573437499547 ns/iter 0.99
JSON_String_Equal/100 13.509487500000107 ns/iter 13.821649491871408 ns/iter 0.98
JSON_String_Equal_Small_By_Perfect_Hash/10 1.648005514496478 ns/iter 1.6808642857140754 ns/iter 0.98
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 11.196141071427032 ns/iter 11.403670312500225 ns/iter 0.98
JSON_String_Fast_Hash/10 3.5658835435364087 ns/iter 3.6305761773634058 ns/iter 0.98
JSON_String_Fast_Hash/100 3.568267226567108 ns/iter 3.658209547855923 ns/iter 0.98
JSON_String_Key_Hash/10 3.8450000000000983 ns/iter 3.8532639508925826 ns/iter 1.00
JSON_String_Key_Hash/100 8.483216517858645 ns/iter 8.500256212051664 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.0791653173112055 ns/iter 3.1963157862440803 ns/iter 0.96
JSON_Object_Defines_Miss_Too_Small 3.8601735491080746 ns/iter 3.9237539044989584 ns/iter 0.98
JSON_Object_Defines_Miss_Too_Large 3.301670630159102 ns/iter 3.3498239114836825 ns/iter 0.99
Pointer_Object_Traverse 52.44153999999526 ns/iter 56.918267857132115 ns/iter 0.92
Pointer_Object_Try_Traverse 53.89405000000807 ns/iter 54.45614285713012 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 128.31087499997855 ns/iter 123.91868750000867 ns/iter 1.04
Pointer_Walker_Schema_ISO_Language 6703343.750000305 ns/iter 6366959.821428558 ns/iter 1.05
Pointer_Maybe_Tracked_Deeply_Nested/0 1847399.7319039758 ns/iter 1852413.9410188196 ns/iter 1.00
Pointer_Maybe_Tracked_Deeply_Nested/1 2866333.050847215 ns/iter 2885823.6607141355 ns/iter 0.99
Pointer_Position_Tracker_Get_Deeply_Nested 440.87686162245717 ns/iter 435.74183588599215 ns/iter 1.01
URITemplateRouter_Create 31574.6874999994 ns/iter 31856.642857143976 ns/iter 0.99
URITemplateRouter_Match 170.75124357710453 ns/iter 171.76005997857365 ns/iter 0.99
URITemplateRouter_Match_BasePath 193.83529409246876 ns/iter 192.75499585914665 ns/iter 1.01
URITemplateRouterView_Restore 18347.00131250825 ns/iter 20256.172015555676 ns/iter 0.91
URITemplateRouterView_Match 135.50455645068138 ns/iter 134.06585714286783 ns/iter 1.01
URITemplateRouterView_Match_BasePath 152.96801339285287 ns/iter 154.33587053575846 ns/iter 0.99
URITemplateRouterView_Arguments 453.0205951729281 ns/iter 455.8845214027092 ns/iter 0.99
JSONL_Parse_Large 25592407.14285644 ns/iter 25241880.769228302 ns/iter 1.01
JSONL_Parse_Large_GZIP 26054061.53845881 ns/iter 25793780.769233234 ns/iter 1.01
HTML_Build_Table_100000 73381177.77779491 ns/iter 73410722.22223172 ns/iter 1.00
HTML_Render_Table_100000 6984189.2857149495 ns/iter 6883131.249998493 ns/iter 1.01
GZIP_Compress_ISO_Language_Set_3_Locations 28222575.999998298 ns/iter 28054679.99999564 ns/iter 1.01
GZIP_Decompress_ISO_Language_Set_3_Locations 7516888.888888692 ns/iter 7340091.111109359 ns/iter 1.02
GZIP_Compress_ISO_Language_Set_3_Schema 1718848.402948688 ns/iter 1739503.6855034688 ns/iter 0.99
GZIP_Decompress_ISO_Language_Set_3_Schema 450313.91585761384 ns/iter 412594.3750000261 ns/iter 1.09
JOSE_VerifySignature_RS256 18368.205073261048 ns/iter 18540.775346757262 ns/iter 0.99
JOSE_VerifySignature_ES512 1185079.8437500033 ns/iter 1182428.749999888 ns/iter 1.00

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

@jviotti jviotti force-pushed the langtag branch 2 times, most recently from bc090cf to 91db2c4 Compare June 24, 2026 00:59
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti changed the title Implement a utility to check BCP 47 language tags Implement a utility to validate BCP 47 language tags Jun 24, 2026
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit d85ae00 into main Jun 24, 2026
12 checks passed
@jviotti jviotti deleted the langtag branch June 24, 2026 01:50
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