Skip to content

Implement a new describes() method in the URI Template router#2531

Merged
jviotti merged 2 commits into
mainfrom
router-describes
Jun 22, 2026
Merged

Implement a new describes() method in the URI Template router#2531
jviotti merged 2 commits into
mainfrom
router-describes

Conversation

@jviotti

@jviotti jviotti commented Jun 22, 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 Jun 22, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR adds a new describes() query to the URI Template router, allowing callers to check whether a given path is within the “space” covered by registered routes without performing a full match.

Changes:

  • Added `URITemplateRouter::describes(path)` and `URITemplateRouterView::describes(path)` to the public API.
  • Implemented `describes()` for the in-memory trie by walking segments and treating intermediate nodes as valid whole-segment prefixes.
  • Implemented `describes()` for the serialized router view with header/offset validation and literal-child binary search, returning true early for greedy expansion nodes.
  • Ensured the catch-all `otherwise()` fallback is not considered by `describes()`.
  • Added extensive unit tests covering prefixes, literal-vs-variable precedence, greedy/optional expansion capture, base-path behavior, and corrupt-buffer handling.

Technical Notes: describes() requires a leading slash (except for the empty-path/root special-case) and does not normalize paths, matching the router’s existing strict segment semantics (including empty segments when present).

🤖 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. 1 suggestion posted.

Fix All in Augment

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

if (node.variable_child >= node_count) {
return false;
}
if (is_expansion_type(nodes[node.variable_child].type)) {

@augmentcode augmentcode Bot Jun 22, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

URITemplateRouterView::describes() returns true for variable-child traversals without validating the variable node’s string-table bounds (unlike match()). On a partially corrupt buffer, this can report a path as described even though match() would fail validation and miss; consider mirroring the match() bounds checks for node.variable_child to fail closed consistently.

Severity: medium

Fix This in Augment

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

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

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/core/uritemplate/uritemplate_router_view.cc">

<violation number="1" location="src/core/uritemplate/uritemplate_router_view.cc:693">
P2: Missing string-table bounds validation for variable child node. The `match()` method validates `variable_node.string_offset` and `variable_node.string_length` against `string_table_size` before accepting a variable child, but `describes()` skips this check. On a partially corrupt buffer, this could cause `describes()` to return `true` (e.g., when `is_expansion_type()` reads a garbage `type` field) while `match()` would correctly reject the same path. Consider mirroring the string-table bounds check here to fail closed consistently.</violation>
</file>

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

Re-trigger cubic

Comment thread src/core/uritemplate/uritemplate_router_view.cc Outdated

@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: f1adb88 Previous: 1b3ab73 Ratio
JOSE_VerifySignature_RS256 24584.1031896271 ns/iter 22344.972024203867 ns/iter 1.10
JOSE_VerifySignature_ES512 642067.1724771045 ns/iter 576932.0213464305 ns/iter 1.11
GZIP_Compress_ISO_Language_Set_3_Locations 39371911.7222228 ns/iter 36477664.05263036 ns/iter 1.08
GZIP_Decompress_ISO_Language_Set_3_Locations 4071369.5755810975 ns/iter 4148968.233532891 ns/iter 0.98
GZIP_Compress_ISO_Language_Set_3_Schema 2283257.4607843016 ns/iter 2019585.4252874102 ns/iter 1.13
GZIP_Decompress_ISO_Language_Set_3_Schema 277572.27043750597 ns/iter 376098.38709680777 ns/iter 0.74
HTML_Build_Table_100000 71217649.2000026 ns/iter 60657840.090915345 ns/iter 1.17
HTML_Render_Table_100000 2156789.9509204277 ns/iter 1960349.3774104693 ns/iter 1.10
JSONL_Parse_Large 12357367.59649267 ns/iter 12804468.77777624 ns/iter 0.97
JSONL_Parse_Large_GZIP 14146007.191490095 ns/iter 14199752.020408131 ns/iter 1.00
URITemplateRouter_Create 29960.145436652278 ns/iter 30830.35726196111 ns/iter 0.97
URITemplateRouter_Match 157.22639668433135 ns/iter 159.09768090400252 ns/iter 0.99
URITemplateRouter_Match_BasePath 186.91610839922726 ns/iter 187.68753022295138 ns/iter 1.00
URITemplateRouterView_Restore 8705.541236154928 ns/iter 7546.565856184486 ns/iter 1.15
URITemplateRouterView_Match 124.63127728155145 ns/iter 123.6810519615865 ns/iter 1.01
URITemplateRouterView_Match_BasePath 144.77351666681378 ns/iter 147.4885790726458 ns/iter 0.98
URITemplateRouterView_Arguments 451.6009533855523 ns/iter 474.03723963331055 ns/iter 0.95
Pointer_Object_Traverse 29.574658200628082 ns/iter 30.2847251625877 ns/iter 0.98
Pointer_Object_Try_Traverse 22.86053658983911 ns/iter 23.063614952946747 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 168.92672941405218 ns/iter 162.42916284654294 ns/iter 1.04
Pointer_Walker_Schema_ISO_Language 1883855.6888296925 ns/iter 1847551.3456464952 ns/iter 1.02
Pointer_Maybe_Tracked_Deeply_Nested/0 1524438.2227076418 ns/iter 1536113.9673913107 ns/iter 0.99
Pointer_Maybe_Tracked_Deeply_Nested/1 1667403.3698296256 ns/iter 1822648.740837837 ns/iter 0.91
Pointer_Position_Tracker_Get_Deeply_Nested 665.3332980936658 ns/iter 521.4962052021981 ns/iter 1.28
JSON_Array_Of_Objects_Unique 402.0316302834224 ns/iter 364.9542361523733 ns/iter 1.10
JSON_Parse_1 7470.274539568681 ns/iter 7731.928577911539 ns/iter 0.97
JSON_Parse_Real 6688.610433275291 ns/iter 6604.733077531824 ns/iter 1.01
JSON_Parse_Decimal 9478.91924203023 ns/iter 11202.382930767675 ns/iter 0.85
JSON_Parse_Schema_ISO_Language 5067581.70503607 ns/iter 5139932.5671646595 ns/iter 0.99
JSON_Parse_Integer 4847.7617766582025 ns/iter 4716.208139707 ns/iter 1.03
JSON_Parse_String_NonSSO_Plain 8386.797658022944 ns/iter 8479.337196883436 ns/iter 0.99
JSON_Parse_String_SSO_Plain 3536.19630649169 ns/iter 3853.4594630327065 ns/iter 0.92
JSON_Parse_String_Escape_Heavy 18978.526458029384 ns/iter 20602.25957208819 ns/iter 0.92
JSON_Parse_Object_Short_Keys 11245.356568364441 ns/iter 11198.10279561448 ns/iter 1.00
JSON_Parse_Object_Scalar_Properties 5712.570634128801 ns/iter 5748.4710074219665 ns/iter 0.99
JSON_Parse_Object_Array_Properties 10251.33572403036 ns/iter 9163.085166273535 ns/iter 1.12
JSON_Parse_Object_Object_Properties 8786.990907131372 ns/iter 9385.9876133533 ns/iter 0.94
JSON_Parse_Nested_Containers 71472.1366899138 ns/iter 72649.21187583619 ns/iter 0.98
JSON_From_String_Copy 19.42126259465497 ns/iter 18.079348818261597 ns/iter 1.07
JSON_From_String_Temporary 16.013988057445122 ns/iter 15.122279596153948 ns/iter 1.06
JSON_Number_To_Double 19.716973091183696 ns/iter 20.88811660584688 ns/iter 0.94
JSON_Object_At_Last_Key/8 6.687442401865342 ns/iter 5.950621722024286 ns/iter 1.12
JSON_Object_At_Last_Key/32 23.592867189115097 ns/iter 21.818792728372664 ns/iter 1.08
JSON_Object_At_Last_Key/128 91.14499906548764 ns/iter 87.57284788129125 ns/iter 1.04
JSON_Object_At_Last_Key/512 379.98378587405597 ns/iter 425.36941201078514 ns/iter 0.89
JSON_Fast_Hash_Helm_Chart_Lock 59.06189722815023 ns/iter 51.569001835403824 ns/iter 1.15
JSON_Equality_Helm_Chart_Lock 157.62911143961625 ns/iter 146.8081726788379 ns/iter 1.07
JSON_Divisible_By_Decimal 232.59339124238232 ns/iter 237.945211658055 ns/iter 0.98
JSON_String_Equal/10 5.420107521731985 ns/iter 5.670064273341869 ns/iter 0.96
JSON_String_Equal/100 6.264086979916709 ns/iter 6.274637209988411 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.7140709872093425 ns/iter 0.7399292433923277 ns/iter 0.97
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 21.957124724069832 ns/iter 25.19020149178097 ns/iter 0.87
JSON_String_Fast_Hash/10 1.055717422122098 ns/iter 0.9351011915574354 ns/iter 1.13
JSON_String_Fast_Hash/100 1.055051655224886 ns/iter 0.9347012167302038 ns/iter 1.13
JSON_String_Key_Hash/10 1.0839017931620734 ns/iter 1.2472588014708355 ns/iter 0.87
JSON_String_Key_Hash/100 14.75811932631376 ns/iter 12.44284254001844 ns/iter 1.19
JSON_Object_Defines_Miss_Same_Length 3.8687177403588975 ns/iter 3.4272113621989155 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Small 3.881473482611178 ns/iter 3.427920298484112 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Large 3.5226503635419237 ns/iter 3.1160810996813866 ns/iter 1.13
Regex_Lower_S_Or_Upper_S_Asterisk 1.0560110208100093 ns/iter 0.9342894976827643 ns/iter 1.13
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.057129517717414 ns/iter 0.9406875435357355 ns/iter 1.12
Regex_Period_Asterisk 0.7038069879148608 ns/iter 0.6229611499050093 ns/iter 1.13
Regex_Group_Period_Asterisk_Group 0.7042602679046318 ns/iter 0.6227638342443644 ns/iter 1.13
Regex_Period_Plus 1.0565296430866167 ns/iter 0.9344315140588584 ns/iter 1.13
Regex_Period 1.0579785868486866 ns/iter 0.93493610986125 ns/iter 1.13
Regex_Caret_Period_Plus_Dollar 0.706439231962482 ns/iter 0.6226579589512798 ns/iter 1.13
Regex_Caret_Group_Period_Plus_Group_Dollar 0.7041958492903497 ns/iter 0.6237105941765728 ns/iter 1.13
Regex_Caret_Period_Asterisk_Dollar 1.0564606606054836 ns/iter 0.9343156879091447 ns/iter 1.13
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.0565523891824955 ns/iter 0.9354799986193283 ns/iter 1.13
Regex_Caret_X_Hyphen 4.227955084465098 ns/iter 4.375843324995551 ns/iter 0.97
Regex_Period_Md_Dollar 49.562778824670076 ns/iter 29.054465913717394 ns/iter 1.71
Regex_Caret_Slash_Period_Asterisk 3.8773984708131075 ns/iter 4.382031544957029 ns/iter 0.88
Regex_Caret_Period_Range_Dollar 1.056024549999221 ns/iter 0.9351635237382718 ns/iter 1.13
Regex_Nested_Backtrack 45.37282128460906 ns/iter 40.98642223520224 ns/iter 1.11

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit d369579 into main Jun 22, 2026
12 checks passed
@jviotti jviotti deleted the router-describes branch June 22, 2026 19:50

@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: f1adb88 Previous: 1b3ab73 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.8259443553357806 ns/iter 1.6754602884027197 ns/iter 1.09
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.8490273867363474 ns/iter 1.6850485451935706 ns/iter 1.10
Regex_Period_Asterisk 1.7491563385994566 ns/iter 1.705348148354047 ns/iter 1.03
Regex_Group_Period_Asterisk_Group 1.718336750365935 ns/iter 1.766589190580772 ns/iter 0.97
Regex_Period_Plus 2.0545782664963843 ns/iter 2.074236873905348 ns/iter 0.99
Regex_Period 2.172255469096062 ns/iter 2.065561269867664 ns/iter 1.05
Regex_Caret_Period_Plus_Dollar 2.3925508532639643 ns/iter 2.0367948525565653 ns/iter 1.17
Regex_Caret_Group_Period_Plus_Group_Dollar 2.202223605007228 ns/iter 1.9686814605102734 ns/iter 1.12
Regex_Caret_Period_Asterisk_Dollar 1.8465358413346544 ns/iter 1.7050971438593352 ns/iter 1.08
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.1481349558538914 ns/iter 1.7039382987713103 ns/iter 1.26
Regex_Caret_X_Hyphen 8.645815776397866 ns/iter 6.262116496877602 ns/iter 1.38
Regex_Period_Md_Dollar 27.591360650703677 ns/iter 17.853157207859518 ns/iter 1.55
Regex_Caret_Slash_Period_Asterisk 5.6862855989343775 ns/iter 4.5272592872038135 ns/iter 1.26
Regex_Caret_Period_Range_Dollar 3.2454109255947423 ns/iter 1.967037806536695 ns/iter 1.65
Regex_Nested_Backtrack 32.3185291452699 ns/iter 25.03380828148653 ns/iter 1.29
JSON_Array_Of_Objects_Unique 375.89268649071323 ns/iter 332.0856719863577 ns/iter 1.13
JSON_Parse_1 3789.7417094184843 ns/iter 3627.207295985325 ns/iter 1.04
JSON_Parse_Real 5285.22700882354 ns/iter 5089.01958000024 ns/iter 1.04
JSON_Parse_Decimal 5795.264078922018 ns/iter 5613.001059585244 ns/iter 1.03
JSON_Parse_Schema_ISO_Language 4596469.7012993395 ns/iter 3767453.7500004135 ns/iter 1.22
JSON_Parse_Integer 3070.0068151343817 ns/iter 3413.931911519133 ns/iter 0.90
JSON_Parse_String_NonSSO_Plain 4176.577321848956 ns/iter 3740.5218355166767 ns/iter 1.12
JSON_Parse_String_SSO_Plain 2797.422106514358 ns/iter 1779.5107702091816 ns/iter 1.57
JSON_Parse_String_Escape_Heavy 23700.283569747604 ns/iter 15999.890044135731 ns/iter 1.48
JSON_Parse_Object_Short_Keys 7629.855629934329 ns/iter 5381.886754987818 ns/iter 1.42
JSON_Parse_Object_Scalar_Properties 3232.097692475228 ns/iter 2629.726656795637 ns/iter 1.23
JSON_Parse_Object_Array_Properties 4066.1297618730696 ns/iter 3439.2617068464738 ns/iter 1.18
JSON_Parse_Object_Object_Properties 4401.9010055908975 ns/iter 3530.0603196393067 ns/iter 1.25
JSON_Parse_Nested_Containers 30367.027909651635 ns/iter 26917.349863031974 ns/iter 1.13
JSON_From_String_Copy 35.85535796100159 ns/iter 24.48957899995585 ns/iter 1.46
JSON_From_String_Temporary 20.64417703663111 ns/iter 18.777465197340117 ns/iter 1.10
JSON_Number_To_Double 36.52474013878601 ns/iter 33.62326415999884 ns/iter 1.09
JSON_Object_At_Last_Key/8 4.37828600979126 ns/iter 3.7902427535293373 ns/iter 1.16
JSON_Object_At_Last_Key/32 14.328757824547724 ns/iter 12.1077920698761 ns/iter 1.18
JSON_Object_At_Last_Key/128 55.370343722419754 ns/iter 52.57885612394943 ns/iter 1.05
JSON_Object_At_Last_Key/512 202.21985341740788 ns/iter 187.18445402569282 ns/iter 1.08
JSON_Fast_Hash_Helm_Chart_Lock 59.651701508615695 ns/iter 56.854977146049386 ns/iter 1.05
JSON_Equality_Helm_Chart_Lock 136.03782810593373 ns/iter 134.22530000235028 ns/iter 1.01
JSON_Divisible_By_Decimal 181.79219360592396 ns/iter 170.0628703936803 ns/iter 1.07
JSON_String_Equal/10 9.12898298491215 ns/iter 6.7965317447788385 ns/iter 1.34
JSON_String_Equal/100 6.598838356790462 ns/iter 6.35071360726784 ns/iter 1.04
JSON_String_Equal_Small_By_Perfect_Hash/10 0.8387907972345432 ns/iter 0.761349078562664 ns/iter 1.10
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.4641211795108102 ns/iter 3.211255429622929 ns/iter 1.08
JSON_String_Fast_Hash/10 2.484034417034772 ns/iter 2.3838808424347393 ns/iter 1.04
JSON_String_Fast_Hash/100 2.173278527102177 ns/iter 1.970007226186528 ns/iter 1.10
JSON_String_Key_Hash/10 1.6545875619008925 ns/iter 1.4345518868297154 ns/iter 1.15
JSON_String_Key_Hash/100 2.4929539282247557 ns/iter 2.081698817720033 ns/iter 1.20
JSON_Object_Defines_Miss_Same_Length 2.5207749463454014 ns/iter 2.3769438792095845 ns/iter 1.06
JSON_Object_Defines_Miss_Too_Small 2.418895771155772 ns/iter 2.3027890287100696 ns/iter 1.05
JSON_Object_Defines_Miss_Too_Large 2.603603318533432 ns/iter 2.3788521979455313 ns/iter 1.09
Pointer_Object_Traverse 14.436468047440735 ns/iter 13.422807963976725 ns/iter 1.08
Pointer_Object_Try_Traverse 23.451446121608395 ns/iter 23.36144995333358 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 164.81083328280218 ns/iter 150.1795825884621 ns/iter 1.10
Pointer_Walker_Schema_ISO_Language 3220437.88785046 ns/iter 2459050.7246382884 ns/iter 1.31
Pointer_Maybe_Tracked_Deeply_Nested/0 966934.1630593056 ns/iter 871659.605905122 ns/iter 1.11
Pointer_Maybe_Tracked_Deeply_Nested/1 1735948.2199167905 ns/iter 1242323.3394834434 ns/iter 1.40
Pointer_Position_Tracker_Get_Deeply_Nested 365.83761227082937 ns/iter 339.2545286026502 ns/iter 1.08
URITemplateRouter_Create 30884.7932134061 ns/iter 24822.79617132984 ns/iter 1.24
URITemplateRouter_Match 175.55420577980834 ns/iter 157.7956173798314 ns/iter 1.11
URITemplateRouter_Match_BasePath 193.3003566425493 ns/iter 199.5752025035599 ns/iter 0.97
URITemplateRouterView_Restore 9637.454290642554 ns/iter 9066.637765089183 ns/iter 1.06
URITemplateRouterView_Match 135.58197735114035 ns/iter 130.66972844397407 ns/iter 1.04
URITemplateRouterView_Match_BasePath 150.35093949353484 ns/iter 143.95076142695333 ns/iter 1.04
URITemplateRouterView_Arguments 406.1934071487255 ns/iter 405.0631234844152 ns/iter 1.00
JSONL_Parse_Large 12400673.357145056 ns/iter 11862254.385968091 ns/iter 1.05
JSONL_Parse_Large_GZIP 15525923.215684945 ns/iter 13517037.673077188 ns/iter 1.15
HTML_Build_Table_100000 68856224.99999043 ns/iter 63695420.45453355 ns/iter 1.08
HTML_Render_Table_100000 4238228.17857031 ns/iter 3052226.13614944 ns/iter 1.39
GZIP_Compress_ISO_Language_Set_3_Locations 31170903.846154593 ns/iter 29347221.153845847 ns/iter 1.06
GZIP_Decompress_ISO_Language_Set_3_Locations 7100402.77777824 ns/iter 6046279.3478247635 ns/iter 1.17
GZIP_Compress_ISO_Language_Set_3_Schema 1565796.171170966 ns/iter 1476986.5021736696 ns/iter 1.06
GZIP_Decompress_ISO_Language_Set_3_Schema 393805.6180924993 ns/iter 278589.98106361623 ns/iter 1.41
JOSE_VerifySignature_RS256 28166.118421056617 ns/iter 21209.720023033162 ns/iter 1.33
JOSE_VerifySignature_ES512 1376348.3843414919 ns/iter 985375.3506313182 ns/iter 1.40

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: f1adb88 Previous: 1b3ab73 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.475303214285824 ns/iter 5.016292999998768 ns/iter 0.49
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.4849682142855403 ns/iter 4.96005892857251 ns/iter 0.50
Regex_Period_Asterisk 2.464226113320684 ns/iter 4.962806608250231 ns/iter 0.50
Regex_Group_Period_Asterisk_Group 2.4693621428566206 ns/iter 4.960152000003291 ns/iter 0.50
Regex_Period_Plus 2.4608039285729837 ns/iter 4.606837064583914 ns/iter 0.53
Regex_Period 2.4614551311813684 ns/iter 4.598772331692665 ns/iter 0.54
Regex_Caret_Period_Plus_Dollar 2.4659810714280996 ns/iter 4.608810747610019 ns/iter 0.54
Regex_Caret_Group_Period_Plus_Group_Dollar 2.592447252149818 ns/iter 4.610291528146338 ns/iter 0.56
Regex_Caret_Period_Asterisk_Dollar 2.456652117794008 ns/iter 4.957692300213937 ns/iter 0.50
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.4578507142872956 ns/iter 4.961620535713759 ns/iter 0.50
Regex_Caret_X_Hyphen 4.022920810754724 ns/iter 7.932233258927114 ns/iter 0.51
Regex_Period_Md_Dollar 20.0484937499823 ns/iter 65.28883928573188 ns/iter 0.31
Regex_Caret_Slash_Period_Asterisk 4.023351004462938 ns/iter 7.4334676339254155 ns/iter 0.54
Regex_Caret_Period_Range_Dollar 2.68418312260139 ns/iter 5.3135999999994965 ns/iter 0.51
Regex_Nested_Backtrack 24.485336780294503 ns/iter 72.89708705354566 ns/iter 0.34
JSON_Array_Of_Objects_Unique 240.58875000004522 ns/iter 514.0093999998498 ns/iter 0.47
JSON_Parse_1 5109.997999998086 ns/iter 9174.654131008107 ns/iter 0.56
JSON_Parse_Real 8861.956473213339 ns/iter 16645.212053571104 ns/iter 0.53
JSON_Parse_Decimal 6152.613392860725 ns/iter 11233.937500001899 ns/iter 0.55
JSON_Parse_Schema_ISO_Language 4512230.201341646 ns/iter 7735681.111115709 ns/iter 0.58
JSON_Parse_Integer 3397.6023400005024 ns/iter 5956.755357142843 ns/iter 0.57
JSON_Parse_String_NonSSO_Plain 4987.786607143465 ns/iter 7975.808035714595 ns/iter 0.63
JSON_Parse_String_SSO_Plain 2398.2189285691547 ns/iter 3633.602008388402 ns/iter 0.66
JSON_Parse_String_Escape_Heavy 12255.47857141659 ns/iter 21193.350000004328 ns/iter 0.58
JSON_Parse_Object_Short_Keys 7464.776785712145 ns/iter 13100.871428564786 ns/iter 0.57
JSON_Parse_Object_Scalar_Properties 4055.8359374998076 ns/iter 6778.060714282219 ns/iter 0.60
JSON_Parse_Object_Array_Properties 6372.869642859769 ns/iter 11463.767187500196 ns/iter 0.56
JSON_Parse_Object_Object_Properties 6485.290178578192 ns/iter 11630.9071428548 ns/iter 0.56
JSON_Parse_Nested_Containers 46775.400000001355 ns/iter 83181.96428567554 ns/iter 0.56
JSON_From_String_Copy 37.029324776785955 ns/iter 62.29691964287148 ns/iter 0.59
JSON_From_String_Temporary 41.556351895865824 ns/iter 82.10167410714422 ns/iter 0.51
JSON_Number_To_Double 60.47828000000664 ns/iter 132.3378035714638 ns/iter 0.46
JSON_Object_At_Last_Key/8 3.161865473691006 ns/iter 8.312588392856567 ns/iter 0.38
JSON_Object_At_Last_Key/32 8.948401299335796 ns/iter 24.475188342919306 ns/iter 0.37
JSON_Object_At_Last_Key/128 51.92806505403924 ns/iter 92.41542444577193 ns/iter 0.56
JSON_Object_At_Last_Key/512 148.90754464269256 ns/iter 428.11743073279024 ns/iter 0.35
JSON_Fast_Hash_Helm_Chart_Lock 32.99970051562517 ns/iter 67.80872321428433 ns/iter 0.49
JSON_Equality_Helm_Chart_Lock 129.56814285709177 ns/iter 284.5398489044372 ns/iter 0.46
JSON_Divisible_By_Decimal 161.95674107137847 ns/iter 361.73179739866225 ns/iter 0.45
JSON_String_Equal/10 6.708021205353377 ns/iter 14.158243303563316 ns/iter 0.47
JSON_String_Equal/100 7.166827678572321 ns/iter 16.63491439753154 ns/iter 0.43
JSON_String_Equal_Small_By_Perfect_Hash/10 1.1168508928562915 ns/iter 2.123682055467476 ns/iter 0.53
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 7.150116071435215 ns/iter 13.881529625534267 ns/iter 0.52
JSON_String_Fast_Hash/10 2.2325296850081475 ns/iter 4.603541551197387 ns/iter 0.48
JSON_String_Fast_Hash/100 2.2425977653518534 ns/iter 4.60501812499956 ns/iter 0.49
JSON_String_Key_Hash/10 2.6011214285712674 ns/iter 4.9582939999982045 ns/iter 0.52
JSON_String_Key_Hash/100 5.6475741071397225 ns/iter 10.942682812505211 ns/iter 0.52
JSON_Object_Defines_Miss_Same_Length 2.033630622728667 ns/iter 4.588400489021995 ns/iter 0.44
JSON_Object_Defines_Miss_Too_Small 2.492470714284017 ns/iter 5.233318749999073 ns/iter 0.48
JSON_Object_Defines_Miss_Too_Large 2.185290312502275 ns/iter 4.255509374999633 ns/iter 0.51
Pointer_Object_Traverse 31.511383928578393 ns/iter 70.87967857139736 ns/iter 0.44
Pointer_Object_Try_Traverse 30.994200892848767 ns/iter 68.5267678571222 ns/iter 0.45
Pointer_Push_Back_Pointer_To_Weak_Pointer 165.43247313153302 ns/iter 201.30060931701374 ns/iter 0.82
Pointer_Walker_Schema_ISO_Language 4513923.489934155 ns/iter 8411363.33333452 ns/iter 0.54
Pointer_Maybe_Tracked_Deeply_Nested/0 1382040.5622491343 ns/iter 2424100.3571432885 ns/iter 0.57
Pointer_Maybe_Tracked_Deeply_Nested/1 2044973.7265435937 ns/iter 3590316.9230760587 ns/iter 0.57
Pointer_Position_Tracker_Get_Deeply_Nested 358.0117525899021 ns/iter 547.0596548674391 ns/iter 0.65
URITemplateRouter_Create 23248.002812463346 ns/iter 39456.375137826275 ns/iter 0.59
URITemplateRouter_Match 109.3536093749492 ns/iter 191.47755300072916 ns/iter 0.57
URITemplateRouter_Match_BasePath 129.34187499987664 ns/iter 218.44601256937602 ns/iter 0.59
URITemplateRouterView_Restore 14452.740166348665 ns/iter 24194.199999994584 ns/iter 0.60
URITemplateRouterView_Match 82.85949776783191 ns/iter 157.12345982145897 ns/iter 0.53
URITemplateRouterView_Match_BasePath 94.60550470509831 ns/iter 188.69676263599194 ns/iter 0.50
URITemplateRouterView_Arguments 322.005625000088 ns/iter 566.3270000000012 ns/iter 0.57
JSONL_Parse_Large 20031008.823533576 ns/iter 32435771.428589802 ns/iter 0.62
JSONL_Parse_Large_GZIP 20734482.352937073 ns/iter 32993729.999998324 ns/iter 0.63
HTML_Build_Table_100000 50354071.42856587 ns/iter 91701900.00005667 ns/iter 0.55
HTML_Render_Table_100000 4967460.999996547 ns/iter 8179966.666668609 ns/iter 0.61
GZIP_Compress_ISO_Language_Set_3_Locations 19178241.176445335 ns/iter 37663815.78948073 ns/iter 0.51
GZIP_Decompress_ISO_Language_Set_3_Locations 5599085.999992894 ns/iter 10516421.875003345 ns/iter 0.53
GZIP_Compress_ISO_Language_Set_3_Schema 1246792.6785705327 ns/iter 2285519.063544814 ns/iter 0.55
GZIP_Decompress_ISO_Language_Set_3_Schema 367293.5658154661 ns/iter 573599.2857142134 ns/iter 0.64
JOSE_VerifySignature_RS256 11586.676785717438 ns/iter 23730.036495125325 ns/iter 0.49
JOSE_VerifySignature_ES512 804860.9103072224 ns/iter 1522397.7911645705 ns/iter 0.53

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: f1adb88 Previous: 1b3ab73 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.2178100221306773 ns/iter 2.211425845739768 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.910584636997606 ns/iter 1.9151002938410466 ns/iter 1.00
Regex_Period_Asterisk 1.9110143280595917 ns/iter 1.9462401751671925 ns/iter 0.98
Regex_Group_Period_Asterisk_Group 2.1851385729641213 ns/iter 2.1982569027524703 ns/iter 0.99
Regex_Period_Plus 3.276543646198947 ns/iter 3.2790511759698617 ns/iter 1.00
Regex_Period 3.006782071033527 ns/iter 3.0084750675957617 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 3.007782328455178 ns/iter 3.0176815967398865 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 3.2920713454710486 ns/iter 3.275871485934858 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 2.465328641949708 ns/iter 2.497428127295355 ns/iter 0.99
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.199027119581922 ns/iter 2.2289536861442496 ns/iter 0.99
Regex_Caret_X_Hyphen 5.194064421370202 ns/iter 5.437479752482296 ns/iter 0.96
Regex_Period_Md_Dollar 22.13043508027681 ns/iter 21.577909220638446 ns/iter 1.03
Regex_Caret_Slash_Period_Asterisk 5.461736614539116 ns/iter 5.4617884002441714 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 3.0043626457504846 ns/iter 3.0053339547926194 ns/iter 1.00
Regex_Nested_Backtrack 29.275100463217562 ns/iter 29.247692740216795 ns/iter 1.00
JSON_Array_Of_Objects_Unique 342.23269151792516 ns/iter 338.8669506540086 ns/iter 1.01
JSON_Parse_1 3619.3004130583167 ns/iter 3645.468486958193 ns/iter 0.99
JSON_Parse_Real 4025.517685403254 ns/iter 4113.574537196858 ns/iter 0.98
JSON_Parse_Decimal 6066.991192593526 ns/iter 6102.822214658555 ns/iter 0.99
JSON_Parse_Schema_ISO_Language 2860938.142857219 ns/iter 2863386.337448686 ns/iter 1.00
JSON_Parse_Integer 3056.9158977624943 ns/iter 3080.804238352144 ns/iter 0.99
JSON_Parse_String_NonSSO_Plain 3947.8212407635806 ns/iter 3944.8726456043446 ns/iter 1.00
JSON_Parse_String_SSO_Plain 2278.914503305322 ns/iter 2154.892405398961 ns/iter 1.06
JSON_Parse_String_Escape_Heavy 10943.066867827816 ns/iter 10993.238831695942 ns/iter 1.00
JSON_Parse_Object_Short_Keys 6292.995027242466 ns/iter 6296.29827157875 ns/iter 1.00
JSON_Parse_Object_Scalar_Properties 3248.0420276128725 ns/iter 3239.9836736494735 ns/iter 1.00
JSON_Parse_Object_Array_Properties 4371.9882443377755 ns/iter 4485.280137074098 ns/iter 0.97
JSON_Parse_Object_Object_Properties 4379.938459710006 ns/iter 4525.555007435163 ns/iter 0.97
JSON_Parse_Nested_Containers 34301.01365556429 ns/iter 34308.72635168319 ns/iter 1.00
JSON_From_String_Copy 17.661161837728425 ns/iter 18.00436690408504 ns/iter 0.98
JSON_From_String_Temporary 14.92590542537852 ns/iter 15.851197098600702 ns/iter 0.94
JSON_Number_To_Double 17.69437636593897 ns/iter 17.54830926405109 ns/iter 1.01
JSON_Object_At_Last_Key/8 3.0037813936134903 ns/iter 3.0054871840470505 ns/iter 1.00
JSON_Object_At_Last_Key/32 10.165594861587985 ns/iter 10.033101251567034 ns/iter 1.01
JSON_Object_At_Last_Key/128 36.68083749843301 ns/iter 36.29642127648697 ns/iter 1.01
JSON_Object_At_Last_Key/512 284.53809214042326 ns/iter 284.13542412130573 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 56.499978005645346 ns/iter 56.45932152816879 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 120.44456397158517 ns/iter 116.15460546819345 ns/iter 1.04
JSON_Divisible_By_Decimal 196.88735014924464 ns/iter 191.46210535743768 ns/iter 1.03
JSON_String_Equal/10 4.640618408124052 ns/iter 4.6674631906166635 ns/iter 0.99
JSON_String_Equal/100 5.461959867706795 ns/iter 5.459726505319291 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.8186235397182904 ns/iter 0.8181615999333024 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 9.684096948777787 ns/iter 9.68230380769525 ns/iter 1.00
JSON_String_Fast_Hash/10 1.9441777956124386 ns/iter 1.9099943868106146 ns/iter 1.02
JSON_String_Fast_Hash/100 1.9094841085513274 ns/iter 1.9127045801951306 ns/iter 1.00
JSON_String_Key_Hash/10 1.909188757386714 ns/iter 1.9092019834573069 ns/iter 1.00
JSON_String_Key_Hash/100 6.271128334764309 ns/iter 6.27033651184796 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 2.274314832441354 ns/iter 2.2612976890601404 ns/iter 1.01
JSON_Object_Defines_Miss_Too_Small 3.274257770329349 ns/iter 3.2736473995476465 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 2.277820750091164 ns/iter 2.2519887092670174 ns/iter 1.01
Pointer_Object_Traverse 21.243309125379533 ns/iter 19.83476812487532 ns/iter 1.07
Pointer_Object_Try_Traverse 23.909392627803943 ns/iter 23.73369958533963 ns/iter 1.01
Pointer_Push_Back_Pointer_To_Weak_Pointer 148.97230325532763 ns/iter 163.177972133203 ns/iter 0.91
Pointer_Walker_Schema_ISO_Language 1395059.0842572527 ns/iter 1397283.6753507177 ns/iter 1.00
Pointer_Maybe_Tracked_Deeply_Nested/0 968814.449645427 ns/iter 991750.7517731262 ns/iter 0.98
Pointer_Maybe_Tracked_Deeply_Nested/1 1260993.8354429847 ns/iter 1247641.0465949168 ns/iter 1.01
Pointer_Position_Tracker_Get_Deeply_Nested 569.4979777142717 ns/iter 543.3332314615863 ns/iter 1.05
URITemplateRouter_Create 22821.20709307695 ns/iter 22659.04011479577 ns/iter 1.01
URITemplateRouter_Match 131.6564655434543 ns/iter 138.70780900576554 ns/iter 0.95
URITemplateRouter_Match_BasePath 159.00186517129822 ns/iter 157.1865775990472 ns/iter 1.01
URITemplateRouterView_Restore 6741.428061239315 ns/iter 6732.26201271033 ns/iter 1.00
URITemplateRouterView_Match 130.4204633872321 ns/iter 107.02514457768584 ns/iter 1.22
URITemplateRouterView_Match_BasePath 147.90837627029723 ns/iter 123.41825261482607 ns/iter 1.20
URITemplateRouterView_Arguments 350.1725971909863 ns/iter 347.6582516436184 ns/iter 1.01
JSONL_Parse_Large 7889197.314606401 ns/iter 7398046.199999666 ns/iter 1.07
JSONL_Parse_Large_GZIP 9106521.434209693 ns/iter 8714537.562499914 ns/iter 1.04
HTML_Build_Table_100000 55421708.916658945 ns/iter 54884379.230770715 ns/iter 1.01
HTML_Render_Table_100000 4470918.496815629 ns/iter 4487089.185897293 ns/iter 1.00
GZIP_Compress_ISO_Language_Set_3_Locations 27003106.923075393 ns/iter 27222262.884615354 ns/iter 0.99
GZIP_Decompress_ISO_Language_Set_3_Locations 2907334.539418871 ns/iter 2922657.091666755 ns/iter 0.99
GZIP_Compress_ISO_Language_Set_3_Schema 1604179.1441647625 ns/iter 1622980.425926128 ns/iter 0.99
GZIP_Decompress_ISO_Language_Set_3_Schema 196004.35096558902 ns/iter 196081.0970901129 ns/iter 1.00
JOSE_VerifySignature_RS256 49497.786952519295 ns/iter 49267.22432470316 ns/iter 1.00
JOSE_VerifySignature_ES512 2191712.683385565 ns/iter 2197502.871069186 ns/iter 1.00

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant