Skip to content

Make URI::relative_to the strict inverse of URI::resolve_from - #2719

Merged
jviotti merged 8 commits into
mainfrom
relativization-round-trip
Aug 9, 2026
Merged

Make URI::relative_to the strict inverse of URI::resolve_from#2719
jviotti merged 8 commits into
mainfrom
relativization-round-trip

Conversation

@jviotti

@jviotti jviotti commented Aug 9, 2026

Copy link
Copy Markdown
Member

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

Review in cubic

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

augmentcode Bot commented Aug 9, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR redefines URI::relative_to around round-trip resolution semantics.

Changes:

  • Updates public documentation to describe the inverse relationship with resolve_from.
  • Changes descendant relativization so references resolve back against file-like bases.
  • Uses a ./ guard for colon-bearing first path segments instead of percent-encoding colons.
  • Adds a shared authority-and-path-prefix check for URI rebasing.
  • Updates rebasing to preserve the target query and fragment while moving it under a new base.
  • Adds tests for authority matching, prefix boundaries, Windows paths, and IRI propagation.
  • Adds a broad round-trip suite covering URI resolution/relativization cases.
Technical notes:
  • The implementation continues to rely on RFC 3986 dot-segment removal during resolution.

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

Fix All in Augment

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

/// That equation is the definition of a correct result, as RFC 3986 states
/// how to resolve a reference but never how to compute one. It holds when
/// both URIs are absolute and the target path carries no dot segments, which
/// resolution always removes and so can never reproduce. When no such

@augmentcode augmentcode Bot Aug 9, 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.

relative_to does not leave dot-segment targets intact: with base https://example.com/a/b and target https://example.com/a/./c, it produces ./c, which resolves to https://example.com/a/c rather than the target. Since resolve_from also normalizes an unchanged absolute target, the documented fallback cannot satisfy the stated equation.

Severity: medium

Fix This in Augment

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

}

// Case 4: General case - compute relative path using .. segments
// Case 3: General case - compute relative path using .. segments

@augmentcode augmentcode Bot Aug 9, 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.

For rootless absolute bases, this branch still violates the new inverse contract: with base schema:foo and target schema:foo/bar, the leading-slash guard builds .//bar, which resolves to schema:/bar rather than the target. Both inputs meet the documented preconditions, but this case is absent from the round-trip suite.

Severity: medium

Fix This in Augment

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


this->fragment_ = std::move(saved_fragment);
this->query_ = std::move(saved_query);
std::move(relative_path));

@augmentcode augmentcode Bot Aug 9, 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.

An empty path segment below the old base is lost here: rebasing https://example.com/foo//bar from https://example.com/foo to /qux yields /qux/bar instead of /qux//bar. path_under preserves that segment in its /bar suffix, but the merge treats its leading slash solely as a separator. Other locations where this applies: src/core/uri/resolution.cc:416.

Severity: medium

Other Locations
  • src/core/uri/resolution.cc:416

Fix This in Augment

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

jviotti added 4 commits August 9, 2026 15:08
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@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: 10b8b4f Previous: 38f833c Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.8111919753995473 ns/iter 1.7461936162061356 ns/iter 1.04
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.785517407538335 ns/iter 1.705098791735679 ns/iter 1.05
Regex_Period_Asterisk 1.7880173343954318 ns/iter 1.5797834052002238 ns/iter 1.13
Regex_Group_Period_Asterisk_Group 1.7941587059794808 ns/iter 1.5889987988310668 ns/iter 1.13
Regex_Period_Plus 2.1171767750811212 ns/iter 1.9071713682454117 ns/iter 1.11
Regex_Period 2.124020843598448 ns/iter 1.8820469126258066 ns/iter 1.13
Regex_Caret_Period_Plus_Dollar 2.1980649296567685 ns/iter 1.881775680337896 ns/iter 1.17
Regex_Caret_Group_Period_Plus_Group_Dollar 2.1864627031873876 ns/iter 1.9093950762244953 ns/iter 1.15
Regex_Caret_Period_Asterisk_Dollar 1.855427122826126 ns/iter 1.586896044145313 ns/iter 1.17
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.8359995407093055 ns/iter 1.6516973207305297 ns/iter 1.11
Regex_Caret_X_Hyphen 6.862267730506961 ns/iter 5.679159008464676 ns/iter 1.21
Regex_Period_Md_Dollar 17.557347443704103 ns/iter 15.939873474478325 ns/iter 1.10
Regex_Caret_Slash_Period_Asterisk 4.903599562592586 ns/iter 4.360997785339078 ns/iter 1.12
Regex_Caret_Period_Range_Dollar 2.1237223443769833 ns/iter 1.9090964352759854 ns/iter 1.11
Regex_Nested_Backtrack 28.35500208198561 ns/iter 24.5538229340939 ns/iter 1.15
JSON_Array_Of_Objects_Unique 350.18492336861954 ns/iter 322.22045029097495 ns/iter 1.09
JSON_Parse_1 6845.0195936953305 ns/iter 6156.049815481139 ns/iter 1.11
JSON_Parse_Real 7188.94346103812 ns/iter 6158.490628300231 ns/iter 1.17
JSON_Parse_Decimal 8276.565140204602 ns/iter 6931.157213525293 ns/iter 1.19
JSON_Parse_Schema_ISO_Language 4306716.00000018 ns/iter 3538553.99489812 ns/iter 1.22
JSON_Parse_Integer 4858.620873139312 ns/iter 4437.4449912488135 ns/iter 1.09
JSON_Parse_String_NonSSO_Plain 8004.409293140318 ns/iter 6982.095456762877 ns/iter 1.15
JSON_Parse_String_SSO_Plain 2993.9242417275605 ns/iter 2622.438869165135 ns/iter 1.14
JSON_Parse_String_Escape_Heavy 22221.1159569514 ns/iter 19744.94915588758 ns/iter 1.13
JSON_Parse_Object_Short_Keys 8472.680999264592 ns/iter 8097.537101904416 ns/iter 1.05
JSON_Parse_Object_Scalar_Properties 4528.380093903818 ns/iter 4054.8707560858174 ns/iter 1.12
JSON_Parse_Object_Array_Properties 7389.539972767484 ns/iter 6547.811849042971 ns/iter 1.13
JSON_Parse_Object_Object_Properties 7624.923312613665 ns/iter 6825.085977069956 ns/iter 1.12
JSON_Parse_Nested_Containers 62739.202402302915 ns/iter 56378.02809838459 ns/iter 1.11
JSON_From_String_Copy 23.603857499190138 ns/iter 22.78463143867221 ns/iter 1.04
JSON_From_String_Temporary 18.53004413664793 ns/iter 17.654123993776572 ns/iter 1.05
JSON_Number_To_Double 34.450188175228526 ns/iter 31.18650231290841 ns/iter 1.10
JSON_Object_At_Last_Key/8 4.219236178269073 ns/iter 4.226176196324249 ns/iter 1.00
JSON_Object_At_Last_Key/32 13.035581182824131 ns/iter 11.333415369022626 ns/iter 1.15
JSON_Object_At_Last_Key/128 55.73886358619883 ns/iter 50.73466680527783 ns/iter 1.10
JSON_Object_At_Last_Key/512 195.41449718132517 ns/iter 175.13346788331367 ns/iter 1.12
JSON_Fast_Hash_Helm_Chart_Lock 60.67647006139787 ns/iter 57.71648910284578 ns/iter 1.05
JSON_Equality_Helm_Chart_Lock 141.45535373208435 ns/iter 126.4558856252595 ns/iter 1.12
JSON_Divisible_By_Decimal 187.7121889744183 ns/iter 162.27767289118805 ns/iter 1.16
JSON_String_Equal/10 7.2771878521535855 ns/iter 6.297786874225496 ns/iter 1.16
JSON_String_Equal/100 7.0016260629924405 ns/iter 6.014959865363058 ns/iter 1.16
JSON_String_Equal_Small_By_Perfect_Hash/10 0.39877197174383233 ns/iter 0.314193706551447 ns/iter 1.27
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.4245437606115257 ns/iter 2.976909474709722 ns/iter 1.15
JSON_String_Fast_Hash/10 2.4976245416141265 ns/iter 2.2056404763625004 ns/iter 1.13
JSON_String_Fast_Hash/100 2.102557985023417 ns/iter 2.001585636904189 ns/iter 1.05
JSON_String_Key_Hash/10 1.7415073284334643 ns/iter 1.5811359473788797 ns/iter 1.10
JSON_String_Key_Hash/100 2.156624103169944 ns/iter 1.898773098915101 ns/iter 1.14
JSON_Object_Defines_Miss_Same_Length 2.770721775395453 ns/iter 2.5725583722442 ns/iter 1.08
JSON_Object_Defines_Miss_Too_Small 2.8192330137841206 ns/iter 2.539952940608776 ns/iter 1.11
JSON_Object_Defines_Miss_Too_Large 2.7666208265502705 ns/iter 2.5166450628484496 ns/iter 1.10
Pointer_Object_Traverse 25.05878085926855 ns/iter 22.080763523108637 ns/iter 1.13
Pointer_Object_Try_Traverse 22.811862743714805 ns/iter 20.375304980683534 ns/iter 1.12
Pointer_Push_Back_Pointer_To_Weak_Pointer 167.99655510676715 ns/iter 148.40424619099477 ns/iter 1.13
Pointer_Walker_Schema_ISO_Language 2887169.5292094722 ns/iter 2370729.4463086007 ns/iter 1.22
Pointer_Maybe_Tracked_Deeply_Nested/0 1285287.3831776532 ns/iter 1121438.1028938275 ns/iter 1.15
Pointer_Maybe_Tracked_Deeply_Nested/1 1063504.4818183235 ns/iter 948067.2101063039 ns/iter 1.12
Pointer_Position_Tracker_Get_Deeply_Nested 382.88013129559556 ns/iter 315.2386804413858 ns/iter 1.21
JSONPath_Descendant_Filter_Nested 1348.535396464521 ns/iter 1209.6421889251437 ns/iter 1.11
URITemplateRouter_Create 24118.64148655981 ns/iter 21506.248846367384 ns/iter 1.12
URITemplateRouter_Match 180.71126882208011 ns/iter 167.64014951871476 ns/iter 1.08
URITemplateRouter_Match_BasePath 215.65856863100706 ns/iter 184.53712795865934 ns/iter 1.17
URITemplateRouterView_Restore 11811.041814315704 ns/iter 9307.559986149456 ns/iter 1.27
URITemplateRouterView_Match 140.8667968625033 ns/iter 125.45652864345041 ns/iter 1.12
URITemplateRouterView_Match_BasePath 162.89093957110202 ns/iter 141.50245436898317 ns/iter 1.15
URITemplateRouterView_Arguments 587.5758586339825 ns/iter 510.2727500474957 ns/iter 1.15
JSONL_Parse_Large 11474824.147057915 ns/iter 9462221.45205411 ns/iter 1.21
JSONL_Parse_Large_GZIP 12464284.350876529 ns/iter 11180176.587301848 ns/iter 1.11
JSONLD_Catalog_Annotation_List_Populate 1116844.22544946 ns/iter 920844.482119183 ns/iter 1.21
JSONLD_Catalog_Materialize 5120358.750000378 ns/iter 4325065.633986395 ns/iter 1.18
HTML_Build_Table_100000 38365629.611114904 ns/iter 38344289.47368451 ns/iter 1.00
HTML_Render_Table_100000 1824111.8379119218 ns/iter 1602255.4704594864 ns/iter 1.14
GZIP_Compress_ISO_Language_Set_3_Locations 27797816.639999837 ns/iter 29441768.360002242 ns/iter 0.94
GZIP_Decompress_ISO_Language_Set_3_Locations 3401427.9019607324 ns/iter 3292169.724770889 ns/iter 1.03
GZIP_Compress_ISO_Language_Set_3_Schema 1644438.1133788074 ns/iter 1422369.349576393 ns/iter 1.16
GZIP_Decompress_ISO_Language_Set_3_Schema 276247.882329953 ns/iter 253760.41642653887 ns/iter 1.09
JOSE_VerifySignature_RS256 20206.637169194943 ns/iter 22000.655068080032 ns/iter 0.92
JOSE_VerifySignature_ES512 936427.4080309647 ns/iter 912778.0900663484 ns/iter 1.03

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

Details
Benchmark suite Current: 10b8b4f Previous: 38f833c Ratio
JOSE_VerifySignature_RS256 22375.988462149995 ns/iter 24677.363199607877 ns/iter 0.91
JOSE_VerifySignature_ES512 577295.0337449189 ns/iter 642440.2960586202 ns/iter 0.90
GZIP_Compress_ISO_Language_Set_3_Locations 36445460.526315875 ns/iter 39363638.66666347 ns/iter 0.93
GZIP_Decompress_ISO_Language_Set_3_Locations 4435263.145569335 ns/iter 4060793.1046512807 ns/iter 1.09
GZIP_Compress_ISO_Language_Set_3_Schema 2028460.6318840736 ns/iter 2282207.009771952 ns/iter 0.89
GZIP_Decompress_ISO_Language_Set_3_Schema 382746.603061813 ns/iter 275574.58795752283 ns/iter 1.39
HTML_Build_Table_100000 62973068.99999843 ns/iter 69621945.29999124 ns/iter 0.90
HTML_Render_Table_100000 1773490.4732821886 ns/iter 2082317.6096098348 ns/iter 0.85
JSONLD_Catalog_Annotation_List_Populate 1484329.4666666568 ns/iter 1509145.907526809 ns/iter 0.98
JSONLD_Catalog_Materialize 7809390.525773507 ns/iter 6922635.465346024 ns/iter 1.13
JSONL_Parse_Large 13696114.09804034 ns/iter 13032454.203703813 ns/iter 1.05
JSONL_Parse_Large_GZIP 15128349.043478644 ns/iter 14455026.29166621 ns/iter 1.05
URITemplateRouter_Create 29897.57172832796 ns/iter 30335.033116884777 ns/iter 0.99
URITemplateRouter_Match 153.9184274796086 ns/iter 150.43234490574994 ns/iter 1.02
URITemplateRouter_Match_BasePath 180.06841271191664 ns/iter 181.23557674022447 ns/iter 0.99
URITemplateRouterView_Restore 8546.918167312051 ns/iter 9920.899968199976 ns/iter 0.86
URITemplateRouterView_Match 124.3543850417765 ns/iter 124.5271705055076 ns/iter 1.00
URITemplateRouterView_Match_BasePath 143.19289576906917 ns/iter 143.03656123938146 ns/iter 1.00
URITemplateRouterView_Arguments 471.72827675392074 ns/iter 465.63687563009603 ns/iter 1.01
JSONPath_Descendant_Filter_Nested 1846.1221562058201 ns/iter 1810.500743133943 ns/iter 1.02
Pointer_Object_Traverse 30.46638682316058 ns/iter 32.509533894843436 ns/iter 0.94
Pointer_Object_Try_Traverse 25.739455248641203 ns/iter 25.755361517247692 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 149.11280526459856 ns/iter 155.02719405472476 ns/iter 0.96
Pointer_Walker_Schema_ISO_Language 2774216.7443608893 ns/iter 2598621.2490839274 ns/iter 1.07
Pointer_Maybe_Tracked_Deeply_Nested/0 1854948.3818682907 ns/iter 1882352.3485253954 ns/iter 0.99
Pointer_Maybe_Tracked_Deeply_Nested/1 1718084.9756691481 ns/iter 1642566.0563381098 ns/iter 1.05
Pointer_Position_Tracker_Get_Deeply_Nested 502.76874890705596 ns/iter 432.8045784194959 ns/iter 1.16
JSON_Array_Of_Objects_Unique 443.0791887598802 ns/iter 445.5404551113932 ns/iter 0.99
JSON_Parse_1 9525.501984558754 ns/iter 9281.184286225862 ns/iter 1.03
JSON_Parse_Real 7891.748922011606 ns/iter 7769.834793671676 ns/iter 1.02
JSON_Parse_Decimal 13060.604370650282 ns/iter 11207.91741662222 ns/iter 1.17
JSON_Parse_Schema_ISO_Language 6894988.346154754 ns/iter 6640228.59433973 ns/iter 1.04
JSON_Parse_Integer 5886.791261727907 ns/iter 5929.6925660251345 ns/iter 0.99
JSON_Parse_String_NonSSO_Plain 12028.285787892335 ns/iter 12126.394669940686 ns/iter 0.99
JSON_Parse_String_SSO_Plain 5192.6648686045155 ns/iter 5079.305848076464 ns/iter 1.02
JSON_Parse_String_Escape_Heavy 26140.626357686124 ns/iter 24781.921883280884 ns/iter 1.05
JSON_Parse_Object_Short_Keys 13714.167691765948 ns/iter 14254.898237081905 ns/iter 0.96
JSON_Parse_Object_Scalar_Properties 7089.8052968980355 ns/iter 7333.798290312652 ns/iter 0.97
JSON_Parse_Object_Array_Properties 11810.282307236599 ns/iter 12715.218830303476 ns/iter 0.93
JSON_Parse_Object_Object_Properties 11914.378569849012 ns/iter 12184.37504579515 ns/iter 0.98
JSON_Parse_Nested_Containers 100182.4359341465 ns/iter 98886.82556156139 ns/iter 1.01
JSON_From_String_Copy 17.80556060655872 ns/iter 21.945456153421844 ns/iter 0.81
JSON_From_String_Temporary 18.766690767113918 ns/iter 22.769221737292863 ns/iter 0.82
JSON_Number_To_Double 21.231806941928628 ns/iter 19.70019297570391 ns/iter 1.08
JSON_Object_At_Last_Key/8 5.924418572759337 ns/iter 6.338534625627492 ns/iter 0.93
JSON_Object_At_Last_Key/32 22.658951451540403 ns/iter 23.582743042099228 ns/iter 0.96
JSON_Object_At_Last_Key/128 87.88795749813764 ns/iter 91.14780685582751 ns/iter 0.96
JSON_Object_At_Last_Key/512 392.5859921319387 ns/iter 379.4315297370175 ns/iter 1.03
JSON_Fast_Hash_Helm_Chart_Lock 70.71691592644706 ns/iter 89.2745961555449 ns/iter 0.79
JSON_Equality_Helm_Chart_Lock 142.830158953912 ns/iter 143.3374494972646 ns/iter 1.00
JSON_Divisible_By_Decimal 260.0317674836444 ns/iter 257.7341651138234 ns/iter 1.01
JSON_String_Equal/10 5.4194723241389395 ns/iter 6.115663475048155 ns/iter 0.89
JSON_String_Equal/100 6.045696196510425 ns/iter 6.114416270007677 ns/iter 0.99
JSON_String_Equal_Small_By_Perfect_Hash/10 0.7441171713216126 ns/iter 0.7124478266593809 ns/iter 1.04
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 25.20043963896503 ns/iter 21.93761281272912 ns/iter 1.15
JSON_String_Fast_Hash/10 2.608308918431572 ns/iter 2.595207117650836 ns/iter 1.01
JSON_String_Fast_Hash/100 2.6132748685983906 ns/iter 2.595867923210405 ns/iter 1.01
JSON_String_Key_Hash/10 1.2471449693543064 ns/iter 1.0855092671821018 ns/iter 1.15
JSON_String_Key_Hash/100 12.447067634351944 ns/iter 14.772412244258211 ns/iter 0.84
JSON_Object_Defines_Miss_Same_Length 2.801814100909397 ns/iter 3.1670700024651133 ns/iter 0.88
JSON_Object_Defines_Miss_Too_Small 3.4261343429022824 ns/iter 3.867788984430721 ns/iter 0.89
JSON_Object_Defines_Miss_Too_Large 3.111733386703456 ns/iter 3.164667899884902 ns/iter 0.98
Regex_Lower_S_Or_Upper_S_Asterisk 0.6223841989934058 ns/iter 0.7035066856987443 ns/iter 0.88
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.6229137074344342 ns/iter 0.7038033501238246 ns/iter 0.89
Regex_Period_Asterisk 0.6252517847114385 ns/iter 0.7036849608796149 ns/iter 0.89
Regex_Group_Period_Asterisk_Group 0.6231036062359493 ns/iter 0.7037509417990238 ns/iter 0.89
Regex_Period_Plus 0.6235337717822513 ns/iter 0.7036182177749323 ns/iter 0.89
Regex_Period 0.6233654568358072 ns/iter 0.7037277342437508 ns/iter 0.89
Regex_Caret_Period_Plus_Dollar 0.6239380336343121 ns/iter 0.7042739464304041 ns/iter 0.89
Regex_Caret_Group_Period_Plus_Group_Dollar 0.6232132607081123 ns/iter 0.7033833764792197 ns/iter 0.89
Regex_Caret_Period_Asterisk_Dollar 0.6228505753293291 ns/iter 0.7039896087055046 ns/iter 0.88
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.622866328691737 ns/iter 0.7037449271038574 ns/iter 0.89
Regex_Caret_X_Hyphen 3.7398667352830883 ns/iter 3.516246409118361 ns/iter 1.06
Regex_Period_Md_Dollar 28.382856236292085 ns/iter 33.92454047847055 ns/iter 0.84
Regex_Caret_Slash_Period_Asterisk 4.04744005759764 ns/iter 3.866538580655264 ns/iter 1.05
Regex_Caret_Period_Range_Dollar 1.2485060854859769 ns/iter 1.4072788487841938 ns/iter 0.89
Regex_Nested_Backtrack 38.04100340514072 ns/iter 40.62011951413796 ns/iter 0.94

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: 10b8b4f Previous: 38f833c Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 5.394540178575165 ns/iter 5.345906999998533 ns/iter 1.01
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 5.114369000002625 ns/iter 5.034488999999667 ns/iter 1.02
Regex_Period_Asterisk 5.090856000001622 ns/iter 5.0385529999994105 ns/iter 1.01
Regex_Group_Period_Asterisk_Group 5.139245000000301 ns/iter 5.106751000000713 ns/iter 1.01
Regex_Period_Plus 4.8044028358927235 ns/iter 4.7929620642697355 ns/iter 1.00
Regex_Period 5.145230999996784 ns/iter 5.051966999999422 ns/iter 1.02
Regex_Caret_Period_Plus_Dollar 4.8562475680474755 ns/iter 4.889790536805628 ns/iter 0.99
Regex_Caret_Group_Period_Plus_Group_Dollar 5.115692857141799 ns/iter 5.161151000002064 ns/iter 0.99
Regex_Caret_Period_Asterisk_Dollar 5.447285999998712 ns/iter 5.4979260000004615 ns/iter 0.99
Regex_Caret_Group_Period_Asterisk_Group_Dollar 5.07215267857321 ns/iter 5.02574500000037 ns/iter 1.01
Regex_Caret_X_Hyphen 8.885410674622106 ns/iter 8.840679871245607 ns/iter 1.01
Regex_Period_Md_Dollar 44.280157863564654 ns/iter 44.82535138549035 ns/iter 0.99
Regex_Caret_Slash_Period_Asterisk 8.166706473216681 ns/iter 8.302246651786964 ns/iter 0.98
Regex_Caret_Period_Range_Dollar 5.969512000001487 ns/iter 6.079658035714276 ns/iter 0.98
Regex_Nested_Backtrack 56.11878999998225 ns/iter 57.11825892857649 ns/iter 0.98
JSON_Array_Of_Objects_Unique 594.5115178568423 ns/iter 601.9790178571936 ns/iter 0.99
JSON_Parse_1 8852.197088403183 ns/iter 8830.753880563188 ns/iter 1.00
JSON_Parse_Real 15904.292410715878 ns/iter 16053.06473214187 ns/iter 0.99
JSON_Parse_Decimal 11982.429687499518 ns/iter 12112.344642856344 ns/iter 0.99
JSON_Parse_Schema_ISO_Language 7466153.571430466 ns/iter 7630845.55555401 ns/iter 0.98
JSON_Parse_Integer 6059.154464285907 ns/iter 6382.276785714679 ns/iter 0.95
JSON_Parse_String_NonSSO_Plain 7814.8895089264715 ns/iter 8102.3008825856905 ns/iter 0.96
JSON_Parse_String_SSO_Plain 3712.228993290879 ns/iter 3653.982123697222 ns/iter 1.02
JSON_Parse_String_Escape_Heavy 21756.678124987164 ns/iter 21883.21250000058 ns/iter 0.99
JSON_Parse_Object_Short_Keys 13145.373458156459 ns/iter 13372.391071426038 ns/iter 0.98
JSON_Parse_Object_Scalar_Properties 6784.619419646682 ns/iter 6979.8482142857665 ns/iter 0.97
JSON_Parse_Object_Array_Properties 11169.150000000627 ns/iter 11524.525000002228 ns/iter 0.97
JSON_Parse_Object_Object_Properties 11399.531249999483 ns/iter 11860.07499999775 ns/iter 0.96
JSON_Parse_Nested_Containers 78642.47767856675 ns/iter 79685.12276786806 ns/iter 0.99
JSON_From_String_Copy 64.0836160714388 ns/iter 65.40401785713357 ns/iter 0.98
JSON_From_String_Temporary 59.48741000001974 ns/iter 59.024705357160194 ns/iter 1.01
JSON_Number_To_Double 122.12883928571371 ns/iter 122.23012499999543 ns/iter 1.00
JSON_Object_At_Last_Key/8 7.31650000000274 ns/iter 7.297052678570789 ns/iter 1.00
JSON_Object_At_Last_Key/32 23.25542384760016 ns/iter 23.57100357142729 ns/iter 0.99
JSON_Object_At_Last_Key/128 90.2770807911801 ns/iter 91.19729057155394 ns/iter 0.99
JSON_Object_At_Last_Key/512 425.5150642545976 ns/iter 429.9656370551183 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 101.80474999998523 ns/iter 103.5465489488321 ns/iter 0.98
JSON_Equality_Helm_Chart_Lock 211.99150000001055 ns/iter 212.97034375002966 ns/iter 1.00
JSON_Divisible_By_Decimal 303.685178571454 ns/iter 299.25607374376665 ns/iter 1.01
JSON_String_Equal/10 10.53165263155549 ns/iter 10.408448437498663 ns/iter 1.01
JSON_String_Equal/100 11.721735937499034 ns/iter 11.779634374999404 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 2.563362453068349 ns/iter 2.522909999999813 ns/iter 1.02
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 15.188408482152179 ns/iter 14.239917410710593 ns/iter 1.07
JSON_String_Fast_Hash/10 6.595012500002083 ns/iter 6.638066964285372 ns/iter 0.99
JSON_String_Fast_Hash/100 6.65524285713965 ns/iter 6.657862500000126 ns/iter 1.00
JSON_String_Key_Hash/10 5.37378125000032 ns/iter 5.3687437500014665 ns/iter 1.00
JSON_String_Key_Hash/100 11.917112500002856 ns/iter 11.962307142860189 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.801924107139801 ns/iter 3.8267879464282117 ns/iter 0.99
JSON_Object_Defines_Miss_Too_Small 4.1704489267065945 ns/iter 4.158180801714817 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.8139051339263523 ns/iter 3.815518415178433 ns/iter 1.00
Pointer_Object_Traverse 67.1556249999737 ns/iter 66.98150892857159 ns/iter 1.00
Pointer_Object_Try_Traverse 71.05522321434624 ns/iter 71.39909821426775 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 161.86549107146675 ns/iter 203.68016054993714 ns/iter 0.79
Pointer_Walker_Schema_ISO_Language 10700332.812504599 ns/iter 10719160.937501471 ns/iter 1.00
Pointer_Maybe_Tracked_Deeply_Nested/0 2414368.5606042817 ns/iter 2355280.321284862 ns/iter 1.03
Pointer_Maybe_Tracked_Deeply_Nested/1 3699872.192511859 ns/iter 3777295.897436535 ns/iter 0.98
Pointer_Position_Tracker_Get_Deeply_Nested 553.262751798098 ns/iter 540.1431361249197 ns/iter 1.02
JSONPath_Descendant_Filter_Nested 2461.320714285518 ns/iter 2358.1764975713277 ns/iter 1.04
URITemplateRouter_Create 40994.237130757974 ns/iter 42227.51160128432 ns/iter 0.97
URITemplateRouter_Match 234.82390624991464 ns/iter 233.22553200606532 ns/iter 1.01
URITemplateRouter_Match_BasePath 264.295217156098 ns/iter 264.93700602958296 ns/iter 1.00
URITemplateRouterView_Restore 33231.39854648082 ns/iter 33166.514437247504 ns/iter 1.00
URITemplateRouterView_Match 181.70736443813828 ns/iter 183.0633381515474 ns/iter 0.99
URITemplateRouterView_Match_BasePath 211.13467361004606 ns/iter 209.17405316185454 ns/iter 1.01
URITemplateRouterView_Arguments 551.5283999993699 ns/iter 544.3963392857703 ns/iter 1.01
JSONL_Parse_Large 32980518.18183012 ns/iter 32805280.95237536 ns/iter 1.01
JSONL_Parse_Large_GZIP 33453080.952399652 ns/iter 33372780.9523853 ns/iter 1.00
JSONLD_Catalog_Annotation_List_Populate 3067966.1016913117 ns/iter 3059383.8983059037 ns/iter 1.00
JSONLD_Catalog_Materialize 7875314.444441352 ns/iter 8441981.111109776 ns/iter 0.93
HTML_Build_Table_100000 92163514.28572774 ns/iter 90954044.44446509 ns/iter 1.01
HTML_Render_Table_100000 7911877.77777951 ns/iter 7992163.333334348 ns/iter 0.99
GZIP_Compress_ISO_Language_Set_3_Locations 35789657.89471879 ns/iter 35454368.4210464 ns/iter 1.01
GZIP_Decompress_ISO_Language_Set_3_Locations 9820314.666661337 ns/iter 9873813.3333336 ns/iter 0.99
GZIP_Compress_ISO_Language_Set_3_Schema 2089360.2898560357 ns/iter 2098101.5625004317 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 631470.7142856995 ns/iter 611394.9000000503 ns/iter 1.03
JOSE_VerifySignature_RS256 21445.140624990698 ns/iter 21228.017544447604 ns/iter 1.01
JOSE_VerifySignature_ES512 1388332.9317274133 ns/iter 1362861.646586121 ns/iter 1.02

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: 10b8b4f Previous: 38f833c Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.546632332223044 ns/iter 2.534254211784145 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.807376348048047 ns/iter 2.802449953854108 ns/iter 1.00
Regex_Period_Asterisk 2.800903354597639 ns/iter 2.799695656172019 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.488603260720193 ns/iter 2.4892076161014844 ns/iter 1.00
Regex_Period_Plus 3.1118382102025413 ns/iter 3.1342009631722227 ns/iter 0.99
Regex_Period 3.4263205345855576 ns/iter 3.426181062801845 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 3.4236618599569764 ns/iter 3.4266148639070875 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 3.1125977250839862 ns/iter 3.1136876682819707 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 3.73655192023561 ns/iter 3.7334838243372324 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 4.049059765079678 ns/iter 4.060613493466596 ns/iter 1.00
Regex_Caret_X_Hyphen 7.5017093021757155 ns/iter 7.4756647383212345 ns/iter 1.00
Regex_Period_Md_Dollar 27.59587429690227 ns/iter 27.53481054771673 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 7.47049750998807 ns/iter 6.538964200457486 ns/iter 1.14
Regex_Caret_Period_Range_Dollar 4.669899695689635 ns/iter 4.6678598195636045 ns/iter 1.00
Regex_Nested_Backtrack 47.75986079668698 ns/iter 46.98357212607578 ns/iter 1.02
JSON_Array_Of_Objects_Unique 423.31172632626567 ns/iter 415.987768144205 ns/iter 1.02
JSON_Parse_1 4852.828693508279 ns/iter 4827.0578727798475 ns/iter 1.01
JSON_Parse_Real 5363.428269799921 ns/iter 5372.297914999157 ns/iter 1.00
JSON_Parse_Decimal 7840.071539781123 ns/iter 7819.873492354764 ns/iter 1.00
JSON_Parse_Schema_ISO_Language 3532052.1919191084 ns/iter 3527455.272727122 ns/iter 1.00
JSON_Parse_Integer 3840.3409271504083 ns/iter 3738.952354537637 ns/iter 1.03
JSON_Parse_String_NonSSO_Plain 5010.874867284484 ns/iter 5058.728214560408 ns/iter 0.99
JSON_Parse_String_SSO_Plain 2720.6751630504796 ns/iter 2776.556178793339 ns/iter 0.98
JSON_Parse_String_Escape_Heavy 14679.578359372696 ns/iter 14615.73749896149 ns/iter 1.00
JSON_Parse_Object_Short_Keys 10814.111920336027 ns/iter 10436.20681646674 ns/iter 1.04
JSON_Parse_Object_Scalar_Properties 3940.388768587085 ns/iter 3955.7478992542765 ns/iter 1.00
JSON_Parse_Object_Array_Properties 5533.359393034348 ns/iter 5631.743596750743 ns/iter 0.98
JSON_Parse_Object_Object_Properties 5480.900829231352 ns/iter 5735.253325701674 ns/iter 0.96
JSON_Parse_Nested_Containers 45488.515453113425 ns/iter 45237.57677878532 ns/iter 1.01
JSON_From_String_Copy 20.65911315897161 ns/iter 21.21145347730009 ns/iter 0.97
JSON_From_String_Temporary 17.774661893624266 ns/iter 17.45884493977339 ns/iter 1.02
JSON_Number_To_Double 23.749185734299292 ns/iter 23.484939789416973 ns/iter 1.01
JSON_Object_At_Last_Key/8 3.822477257315201 ns/iter 3.8417167923712165 ns/iter 0.99
JSON_Object_At_Last_Key/32 12.178912000888129 ns/iter 12.191293550877287 ns/iter 1.00
JSON_Object_At_Last_Key/128 49.39063827996432 ns/iter 49.73033534757311 ns/iter 0.99
JSON_Object_At_Last_Key/512 399.93463842604064 ns/iter 400.34717354216434 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 60.11183455795326 ns/iter 60.07002297476437 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 173.26044610273414 ns/iter 175.26659166793885 ns/iter 0.99
JSON_Divisible_By_Decimal 250.81094277602134 ns/iter 251.54398028294534 ns/iter 1.00
JSON_String_Equal/10 5.921253102886323 ns/iter 5.9216606043286175 ns/iter 1.00
JSON_String_Equal/100 6.5439985042353515 ns/iter 6.549646024689716 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9405762182584584 ns/iter 0.9399859962989943 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.9312100723879 ns/iter 10.636647545369838 ns/iter 1.40
JSON_String_Fast_Hash/10 2.8027985784416054 ns/iter 2.8038775766903794 ns/iter 1.00
JSON_String_Fast_Hash/100 2.802652685364664 ns/iter 2.8021762141878965 ns/iter 1.00
JSON_String_Key_Hash/10 2.741805868870389 ns/iter 2.1829614286534986 ns/iter 1.26
JSON_String_Key_Hash/100 9.111604767415528 ns/iter 6.537107220968381 ns/iter 1.39
JSON_Object_Defines_Miss_Same_Length 2.9514971255248623 ns/iter 3.1217085435877867 ns/iter 0.95
JSON_Object_Defines_Miss_Too_Small 3.426149565515425 ns/iter 3.487663079231422 ns/iter 0.98
JSON_Object_Defines_Miss_Too_Large 2.596557972260209 ns/iter 2.6151025870156634 ns/iter 0.99
Pointer_Object_Traverse 28.61108599835814 ns/iter 28.539720267632266 ns/iter 1.00
Pointer_Object_Try_Traverse 31.221041444514768 ns/iter 31.338125331172822 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 220.05246415884181 ns/iter 161.26375811377744 ns/iter 1.36
Pointer_Walker_Schema_ISO_Language 2577856.3235292877 ns/iter 2553179.0109490585 ns/iter 1.01
Pointer_Maybe_Tracked_Deeply_Nested/0 1196066.9965457472 ns/iter 1200210.5692039342 ns/iter 1.00
Pointer_Maybe_Tracked_Deeply_Nested/1 1563986.7410714359 ns/iter 1584740.4988660591 ns/iter 0.99
Pointer_Position_Tracker_Get_Deeply_Nested 700.7789641611926 ns/iter 673.2063530945808 ns/iter 1.04
JSONPath_Descendant_Filter_Nested 1576.7901903447448 ns/iter 1570.2812554549623 ns/iter 1.00
URITemplateRouter_Create 31978.004883615507 ns/iter 31710.00961755805 ns/iter 1.01
URITemplateRouter_Match 188.181215908653 ns/iter 177.56141193037112 ns/iter 1.06
URITemplateRouter_Match_BasePath 215.34911458089488 ns/iter 209.47455312523135 ns/iter 1.03
URITemplateRouterView_Restore 8418.85690095123 ns/iter 8558.404830566447 ns/iter 0.98
URITemplateRouterView_Match 162.40866303825683 ns/iter 161.80647536860178 ns/iter 1.00
URITemplateRouterView_Match_BasePath 190.07558547121744 ns/iter 190.73423747640504 ns/iter 1.00
URITemplateRouterView_Arguments 449.9195423385336 ns/iter 435.596553481022 ns/iter 1.03
JSONL_Parse_Large 9600102.72602749 ns/iter 9635422.041665403 ns/iter 1.00
JSONL_Parse_Large_GZIP 11252359.999999836 ns/iter 11188908.571428992 ns/iter 1.01
JSONLD_Catalog_Annotation_List_Populate 1317291.6547170884 ns/iter 1317669.561797728 ns/iter 1.00
JSONLD_Catalog_Materialize 4322693.840491031 ns/iter 4356765.262500062 ns/iter 0.99
HTML_Build_Table_100000 63670472.09089999 ns/iter 64762150.72726435 ns/iter 0.98
HTML_Render_Table_100000 5304568.8682166925 ns/iter 5430599.116279641 ns/iter 0.98
GZIP_Compress_ISO_Language_Set_3_Locations 32510114.5909085 ns/iter 32657186.476193428 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Locations 4088592.9415202956 ns/iter 4149875.1497007753 ns/iter 0.99
GZIP_Compress_ISO_Language_Set_3_Schema 1858097.3164895244 ns/iter 1864623.1653334931 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 355796.15251656494 ns/iter 356015.4397560729 ns/iter 1.00
JOSE_VerifySignature_RS256 58434.99874245375 ns/iter 58163.28353988487 ns/iter 1.00
JOSE_VerifySignature_ES512 2409426.1965517253 ns/iter 2422193.3425604054 ns/iter 0.99

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.

All reported issues were addressed

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

Re-trigger cubic

Comment thread src/core/uri/resolution.cc
jviotti added 3 commits August 9, 2026 18:03
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti
jviotti merged commit 036ae97 into main Aug 9, 2026
13 checks passed
@jviotti
jviotti deleted the relativization-round-trip branch August 9, 2026 21:41
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