Skip to content

Commit

Permalink
Implement a new URI::rebase method (#1512)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Jan 31, 2025
1 parent c3d468a commit 0204113
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 9 deletions.
17 changes: 16 additions & 1 deletion src/core/uri/include/sourcemeta/core/uri.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,21 @@ class SOURCEMETA_CORE_URI_EXPORT URI {
/// ```
auto relative_to(const URI &base) -> URI &;

/// Attempt to change the base of a URI . If the URI is not
/// relative to the former, leave the URI intact. For example:
///
/// ```cpp
/// #include <sourcemeta/core/uri.h>
/// #include <cassert>
///
/// sourcemeta::core::URI uri{"https://example.com/foo/bar/baz"};
/// const sourcemeta::core::URI base{"https://example.com/foo"};
/// const sourcemeta::core::URI new_base{"/qux"};
/// uri.rebase(base, new_base);
/// assert(uri.recompose() == "/qux/bar/baz");
/// ```
auto rebase(const URI &base, const URI &new_base) -> URI &;

/// Escape a string as established by RFC 3986 using C++ standard stream. For
/// example:
///
Expand Down Expand Up @@ -383,7 +398,7 @@ class SOURCEMETA_CORE_URI_EXPORT URI {

private:
bool parsed = false;
auto parse_json() -> void;
auto parse() -> void;

// Exporting symbols that depends on the standard C++ library is considered
// safe.
Expand Down
39 changes: 31 additions & 8 deletions src/core/uri/uri.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static auto uri_text_range(const UriTextRangeA *const range)
range->afterLast - range->first)};
}

static auto uri_parse_json(const std::string &data, UriUriA *uri) -> void {
static auto uri_parse(const std::string &data, UriUriA *uri) -> void {
const char *error_position;
switch (uriParseSingleUriA(uri, data.c_str(), &error_position)) {
case URI_ERROR_SYNTAX:
Expand Down Expand Up @@ -117,14 +117,14 @@ struct URI::Internal {
};

URI::URI(std::string input) : data{std::move(input)}, internal{new Internal} {
this->parse_json();
this->parse();
}

URI::URI(std::istream &input) : internal{new Internal} {
std::ostringstream output;
output << input.rdbuf();
this->data = output.str();
this->parse_json();
this->parse();
}

URI::~URI() { uriFreeUriMembersA(&this->internal->uri); }
Expand All @@ -146,7 +146,7 @@ URI::URI(URI &&other)
other.internal = nullptr;
}

auto URI::parse_json() -> void {
auto URI::parse() -> void {
if (this->parsed) {
// clean
this->path_ = std::nullopt;
Expand All @@ -163,7 +163,7 @@ auto URI::parse_json() -> void {
// NOTE: we don't skip this line for fast path
// as the internal structure of uriparser could still
// be used by resolve_from and relative_to methods
uri_parse_json(this->data, &this->internal->uri);
uri_parse(this->data, &this->internal->uri);

// Fast path for the root path
if (this->data == "/") {
Expand Down Expand Up @@ -487,7 +487,7 @@ auto URI::resolve_from(const URI &base) -> URI & {
uri_normalize(&absoluteDest);
this->data = uri_to_string(&absoluteDest);
uriFreeUriMembersA(&absoluteDest);
this->parse_json();
this->parse();
return *this;
} catch (...) {
uriFreeUriMembersA(&absoluteDest);
Expand Down Expand Up @@ -530,20 +530,43 @@ auto URI::relative_to(const URI &base) -> URI & {
copy.data.erase(0, 1);
}

copy.parse_json();
copy.parse();

// `uriparser` has this weird thing where it will only look at scheme and
// authority, incorrectly thinking that a certain URI is a base of another one
// if the path of the former exceeds the path of the latter. This is an ugly
// workaround to prevent this non-sense.
if (!copy.recompose().empty() || base.recompose() == this->recompose()) {
this->data = std::move(copy.data);
this->parse_json();
this->parse();
}

return *this;
}

auto URI::rebase(const URI &base, const URI &new_base) -> URI & {
this->relative_to(base);
if (!this->is_relative()) {
return *this;
}

// TODO: We should be able to this with `resolve_from`,
// however that methow can't take a relative base yet
std::ostringstream new_uri;
const auto new_base_string{new_base.recompose()};
const auto new_uri_string{this->recompose()};

new_uri << new_base_string;
if (!new_base_string.ends_with('/') && !new_uri_string.empty()) {
new_uri << '/';
}
new_uri << new_uri_string;

this->data = std::move(URI{new_uri.str()}.data);
this->parse();
return *this;
}

auto URI::from_fragment(std::string_view fragment) -> URI {
assert(fragment.empty() || fragment.front() != '#');
std::ostringstream uri;
Expand Down
1 change: 1 addition & 0 deletions test/uri/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ sourcemeta_googletest(NAMESPACE sourcemeta PROJECT core NAME uri
uri_is_tag_test.cc
uri_is_mailto_test.cc
uri_is_ipv6_test.cc
uri_rebase_test.cc
uri_recompose_test.cc
uri_recompose_without_fragment_test.cc
uri_normalize_test.cc
Expand Down
27 changes: 27 additions & 0 deletions test/uri/uri_rebase_test.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include <gtest/gtest.h>

#include <sourcemeta/core/uri.h>

TEST(URI_rebase, absolute_to_relative_match) {
sourcemeta::core::URI uri{"https://example.com/foo/bar/baz"};
const sourcemeta::core::URI base{"https://example.com/foo"};
const sourcemeta::core::URI new_base{"/qux"};
uri.rebase(base, new_base);
EXPECT_EQ(uri.recompose(), "/qux/bar/baz");
}

TEST(URI_rebase, absolute_to_relative_mismatch) {
sourcemeta::core::URI uri{"https://example.com/foo/bar/baz"};
const sourcemeta::core::URI base{"https://another.com/test"};
const sourcemeta::core::URI new_base{"/qux"};
uri.rebase(base, new_base);
EXPECT_EQ(uri.recompose(), "https://example.com/foo/bar/baz");
}

TEST(URI_rebase, absolute_to_relative_equal) {
sourcemeta::core::URI uri{"https://example.com/foo/bar/baz"};
const sourcemeta::core::URI base{"https://example.com/foo/bar/baz"};
const sourcemeta::core::URI new_base{"/qux"};
uri.rebase(base, new_base);
EXPECT_EQ(uri.recompose(), "/qux");
}

5 comments on commit 0204113

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (macos/llvm)

Benchmark suite Current: 0204113 Previous: c3d468a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.40528949223717 ns/iter 1.6132219264261654 ns/iter 1.49
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.1010753595790823 ns/iter 1.62865865887365 ns/iter 1.29
Regex_Period_Asterisk 2.1022324273070314 ns/iter 1.592038192279076 ns/iter 1.32
Regex_Group_Period_Asterisk_Group 2.277073569655098 ns/iter 1.6023101441047511 ns/iter 1.42
Regex_Period_Plus 2.6179839876608964 ns/iter 1.9092907306498474 ns/iter 1.37
Regex_Period 2.249626963925015 ns/iter 1.9109323981106034 ns/iter 1.18
Regex_Caret_Period_Plus_Dollar 2.3424810738343758 ns/iter 1.9063061258617937 ns/iter 1.23
Regex_Caret_Group_Period_Plus_Group_Dollar 2.825780301767074 ns/iter 1.948605287084221 ns/iter 1.45
Regex_Caret_Period_Asterisk_Dollar 2.4141685558597996 ns/iter 1.6302195279847143 ns/iter 1.48
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.311167324375198 ns/iter 1.6708929359523077 ns/iter 1.38
Regex_Caret_X_Hyphen 8.268186254546137 ns/iter 6.668508113499011 ns/iter 1.24
Regex_Period_Md_Dollar 90.77960228045144 ns/iter 72.07243247022359 ns/iter 1.26
Regex_Caret_Slash_Period_Asterisk 6.922445528292117 ns/iter 5.112888803292077 ns/iter 1.35
Regex_Caret_Period_Range_Dollar 3.1230026097978594 ns/iter 2.402459608512268 ns/iter 1.30
Regex_Nested_Backtrack 1100.3113091607884 ns/iter 767.1767151160252 ns/iter 1.43
JSON_Array_Of_Objects_Unique 445.1362971572662 ns/iter 337.7685618266326 ns/iter 1.32
JSON_Parse_1 30737.690785178576 ns/iter 21847.69699413882 ns/iter 1.41
JSON_Fast_Hash_Helm_Chart_Lock 71.98867151722295 ns/iter 48.81202448491157 ns/iter 1.47
JSON_Equality_Helm_Chart_Lock 181.84870052571904 ns/iter 122.34174422804305 ns/iter 1.49
JSON_String_Equal/10 10.816496818552835 ns/iter 7.626710759150559 ns/iter 1.42
JSON_String_Equal/100 8.130422814533588 ns/iter 6.1449219527109555 ns/iter 1.32
JSON_String_Equal_Small_By_Perfect_Hash/10 0.39599403970443975 ns/iter 0.32136900953678493 ns/iter 1.23
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.7685585760553497 ns/iter 3.0871657954181946 ns/iter 1.22
JSON_String_Fast_Hash/10 2.1767626683963863 ns/iter 1.6511864788861732 ns/iter 1.32
JSON_String_Fast_Hash/100 2.395204551711763 ns/iter 1.9217824713236666 ns/iter 1.25
JSON_String_Key_Hash/10 1.692902847516392 ns/iter 1.2959113235136792 ns/iter 1.31
JSON_String_Key_Hash/100 1.7640515009134172 ns/iter 1.2956803263040384 ns/iter 1.36
JSON_Object_Defines_Miss_Same_Length 2.7454944941331045 ns/iter 2.24713382564254 ns/iter 1.22
JSON_Object_Defines_Miss_Too_Small 2.7825303138383943 ns/iter 2.266169563375415 ns/iter 1.23
JSON_Object_Defines_Miss_Too_Large 2.6836957425825463 ns/iter 2.259714165855326 ns/iter 1.19
Pointer_Object_Traverse 29.41010936870542 ns/iter 17.284188800450774 ns/iter 1.70
Pointer_Object_Try_Traverse 28.353831962054223 ns/iter 22.241601129791892 ns/iter 1.27
Pointer_Push_Back_Pointer_To_Weak_Pointer 232.66725631368473 ns/iter 172.14661983129048 ns/iter 1.35

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

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (linux/llvm)

Benchmark suite Current: 0204113 Previous: c3d468a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.21986859531364 ns/iter 2.2149192883381406 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.1791113724026356 ns/iter 2.2278377711646424 ns/iter 0.98
Regex_Period_Asterisk 2.1836536498130132 ns/iter 2.2045383462973294 ns/iter 0.99
Regex_Group_Period_Asterisk_Group 2.1798587237339486 ns/iter 2.2271069193108604 ns/iter 0.98
Regex_Period_Plus 2.4865524732996733 ns/iter 2.796657471234095 ns/iter 0.89
Regex_Period 2.4862937492451205 ns/iter 2.52091532562572 ns/iter 0.99
Regex_Caret_Period_Plus_Dollar 2.486509895828284 ns/iter 2.486391235489686 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 2.486029122155151 ns/iter 2.4899976537769306 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 2.192333155056611 ns/iter 2.486749510911046 ns/iter 0.88
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.1859769707239756 ns/iter 2.488192848254724 ns/iter 0.88
Regex_Caret_X_Hyphen 12.51904500003585 ns/iter 12.544773097899597 ns/iter 1.00
Regex_Period_Md_Dollar 81.33361760616131 ns/iter 81.43376532458123 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 5.902911237214954 ns/iter 6.120749177551043 ns/iter 0.96
Regex_Caret_Period_Range_Dollar 4.042315002427575 ns/iter 4.042899854338092 ns/iter 1.00
Regex_Nested_Backtrack 516.0803699999974 ns/iter 489.8854838813028 ns/iter 1.05
JSON_Array_Of_Objects_Unique 407.5347936846079 ns/iter 406.91847579404254 ns/iter 1.00
JSON_Parse_1 30617.8600147948 ns/iter 30488.781807638275 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 59.25027570861468 ns/iter 59.75723166907586 ns/iter 0.99
JSON_Equality_Helm_Chart_Lock 159.28874627870363 ns/iter 151.13803946511163 ns/iter 1.05
JSON_String_Equal/10 7.771790345597506 ns/iter 6.254851828174069 ns/iter 1.24
JSON_String_Equal/100 8.09105473020457 ns/iter 6.898175271452233 ns/iter 1.17
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9345603668633746 ns/iter 0.9349128745631464 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 10.256879956541114 ns/iter 14.59806438072399 ns/iter 0.70
JSON_String_Fast_Hash/10 2.4885502833624558 ns/iter 2.4894280418100436 ns/iter 1.00
JSON_String_Fast_Hash/100 2.486020017164823 ns/iter 2.48591011974145 ns/iter 1.00
JSON_String_Key_Hash/10 2.227541274483755 ns/iter 2.691225684326004 ns/iter 0.83
JSON_String_Key_Hash/100 1.8691706961813093 ns/iter 1.8662058157310295 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.7391244571419975 ns/iter 3.738323205761038 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.7411910630330603 ns/iter 3.7404648203799997 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.740703429573011 ns/iter 3.734676533248378 ns/iter 1.00
Pointer_Object_Traverse 45.86531325778706 ns/iter 44.38559942634216 ns/iter 1.03
Pointer_Object_Try_Traverse 52.32695454645684 ns/iter 52.27130399918846 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 353.9687046292951 ns/iter 307.8820744232105 ns/iter 1.15

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

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (windows/msvc)

Benchmark suite Current: 0204113 Previous: c3d468a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 6.918552455358805 ns/iter 6.897590401785233 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 7.153497767856518 ns/iter 6.955555357143745 ns/iter 1.03
Regex_Period_Asterisk 6.855547737252702 ns/iter 6.908341517858827 ns/iter 0.99
Regex_Group_Period_Asterisk_Group 7.094109374999086 ns/iter 7.007477678571763 ns/iter 1.01
Regex_Period_Plus 7.569462053572198 ns/iter 7.465551339286439 ns/iter 1.01
Regex_Period 7.1607615751773706 ns/iter 7.381071395618279 ns/iter 0.97
Regex_Caret_Period_Plus_Dollar 7.364873214285694 ns/iter 7.371216517856485 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 7.746556919643004 ns/iter 7.666034598215227 ns/iter 1.01
Regex_Caret_Period_Asterisk_Dollar 7.143938616070195 ns/iter 6.903112469182651 ns/iter 1.03
Regex_Caret_Group_Period_Asterisk_Group_Dollar 7.1018917410725635 ns/iter 6.892226562500119 ns/iter 1.03
Regex_Caret_X_Hyphen 11.84594821428472 ns/iter 14.253836320293052 ns/iter 0.83
Regex_Period_Md_Dollar 152.39560267857095 ns/iter 150.842464248127 ns/iter 1.01
Regex_Caret_Slash_Period_Asterisk 10.417617187499673 ns/iter 10.286482812499997 ns/iter 1.01
Regex_Caret_Period_Range_Dollar 7.676850446427201 ns/iter 7.466443080357266 ns/iter 1.03
Regex_Nested_Backtrack 612.9008928569743 ns/iter 608.1894000001284 ns/iter 1.01
JSON_Array_Of_Objects_Unique 491.7552000001706 ns/iter 489.0927031658577 ns/iter 1.01
JSON_Parse_1 79747.20771391924 ns/iter 79862.131696424 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 64.3961071428529 ns/iter 63.598901785724145 ns/iter 1.01
JSON_Equality_Helm_Chart_Lock 188.57108533168898 ns/iter 190.9624456216509 ns/iter 0.99
JSON_String_Equal/10 9.055562906000413 ns/iter 8.996712013409327 ns/iter 1.01
JSON_String_Equal/100 9.95141406250255 ns/iter 9.928766473534495 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 2.168704687500167 ns/iter 2.1707043749998434 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 15.211705357143858 ns/iter 15.057514408095356 ns/iter 1.01
JSON_String_Fast_Hash/10 4.033113623273648 ns/iter 4.033076480416005 ns/iter 1.00
JSON_String_Fast_Hash/100 4.027788846478344 ns/iter 4.035777462564652 ns/iter 1.00
JSON_String_Key_Hash/10 7.807915143714567 ns/iter 7.811377197270173 ns/iter 1.00
JSON_String_Key_Hash/100 4.024014203614225 ns/iter 4.0444973286517385 ns/iter 0.99
JSON_Object_Defines_Miss_Same_Length 3.725400529061223 ns/iter 3.7285199933408597 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 4.9573670000017955 ns/iter 4.962575492179492 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.4062108867750145 ns/iter 3.4284898153071324 ns/iter 0.99
Pointer_Object_Traverse 50.198679999994056 ns/iter 48.802676905331346 ns/iter 1.03
Pointer_Object_Try_Traverse 67.84365178570998 ns/iter 68.08651785714152 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 179.58161693625948 ns/iter 161.11787016411662 ns/iter 1.11

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

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (macos/gcc)

Benchmark suite Current: 0204113 Previous: c3d468a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.8842584735646382 ns/iter 1.9545728162004088 ns/iter 0.96
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.8922256638546033 ns/iter 1.915285261861305 ns/iter 0.99
Regex_Period_Asterisk 1.8851627068668948 ns/iter 1.8924581399868308 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 1.8816965590905295 ns/iter 1.8938610132383853 ns/iter 0.99
Regex_Period_Plus 1.5730677628124818 ns/iter 1.9047222925579328 ns/iter 0.83
Regex_Period 1.6243788883841455 ns/iter 1.9072466962002732 ns/iter 0.85
Regex_Caret_Period_Plus_Dollar 1.606879258388706 ns/iter 1.9187974588903032 ns/iter 0.84
Regex_Caret_Group_Period_Plus_Group_Dollar 1.606154747923962 ns/iter 1.9094251696692368 ns/iter 0.84
Regex_Caret_Period_Asterisk_Dollar 2.0461007890820166 ns/iter 1.9339835786119668 ns/iter 1.06
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.9261118606023913 ns/iter 2.2925803865407643 ns/iter 0.84
Regex_Caret_X_Hyphen 6.069722129086121 ns/iter 6.124952991585372 ns/iter 0.99
Regex_Period_Md_Dollar 72.73320001669275 ns/iter 68.96130249492153 ns/iter 1.05
Regex_Caret_Slash_Period_Asterisk 4.602272198797153 ns/iter 4.448266748599201 ns/iter 1.03
Regex_Caret_Period_Range_Dollar 1.8881345795359983 ns/iter 1.9438410896439537 ns/iter 0.97
Regex_Nested_Backtrack 814.743395535848 ns/iter 823.2536066280511 ns/iter 0.99
JSON_Array_Of_Objects_Unique 209.88632779878563 ns/iter 212.8317046652063 ns/iter 0.99
JSON_Parse_1 23102.044675125777 ns/iter 23447.984281860627 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 23.77156908596748 ns/iter 23.534191331448497 ns/iter 1.01
JSON_Equality_Helm_Chart_Lock 126.59933694956324 ns/iter 115.05873759341422 ns/iter 1.10
JSON_String_Equal/10 5.365191582379881 ns/iter 5.733769571908107 ns/iter 0.94
JSON_String_Equal/100 5.054135717233418 ns/iter 5.430445681478728 ns/iter 0.93
JSON_String_Equal_Small_By_Perfect_Hash/10 0.7446774539073732 ns/iter 0.795870890036801 ns/iter 0.94
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.449735846810854 ns/iter 3.503881812917075 ns/iter 0.98
JSON_String_Fast_Hash/10 1.8929260373024552 ns/iter 1.9161700820516099 ns/iter 0.99
JSON_String_Fast_Hash/100 1.8917086117150954 ns/iter 1.9247383176291506 ns/iter 0.98
JSON_String_Key_Hash/10 1.4380577250658628 ns/iter 1.4543259732370692 ns/iter 0.99
JSON_String_Key_Hash/100 1.9659817285898 ns/iter 1.934437870977794 ns/iter 1.02
JSON_Object_Defines_Miss_Same_Length 1.7256799494108641 ns/iter 1.7581643373149969 ns/iter 0.98
JSON_Object_Defines_Miss_Too_Small 1.8859921347997552 ns/iter 1.9229177365797465 ns/iter 0.98
JSON_Object_Defines_Miss_Too_Large 1.727206263379654 ns/iter 1.752470284966356 ns/iter 0.99
Pointer_Object_Traverse 58.0782072746402 ns/iter 56.08684450985707 ns/iter 1.04
Pointer_Object_Try_Traverse 33.89767211560459 ns/iter 38.1229252166395 ns/iter 0.89
Pointer_Push_Back_Pointer_To_Weak_Pointer 155.50820584147908 ns/iter 162.23391221895838 ns/iter 0.96

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

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (linux/gcc)

Benchmark suite Current: 0204113 Previous: c3d468a Ratio
Pointer_Object_Traverse 45.71956643828084 ns/iter 45.826712498255894 ns/iter 1.00
Pointer_Object_Try_Traverse 26.230819232410663 ns/iter 26.14608308080146 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 143.02938222374664 ns/iter 145.21111672945935 ns/iter 0.98
JSON_Array_Of_Objects_Unique 411.4672558743041 ns/iter 409.9289689854521 ns/iter 1.00
JSON_Parse_1 33144.2387918369 ns/iter 33483.77904925706 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 62.063919613319946 ns/iter 62.774320197065556 ns/iter 0.99
JSON_Equality_Helm_Chart_Lock 150.73609536574662 ns/iter 149.34803021449997 ns/iter 1.01
JSON_String_Equal/10 6.348699401445221 ns/iter 6.339446156100262 ns/iter 1.00
JSON_String_Equal/100 6.940789691962872 ns/iter 6.961845521477361 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9356261160601498 ns/iter 0.9357939077181391 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.289501268530168 ns/iter 14.324747666855007 ns/iter 1.00
JSON_String_Fast_Hash/10 0.9312233458793807 ns/iter 0.934059813151016 ns/iter 1.00
JSON_String_Fast_Hash/100 0.933555347146051 ns/iter 0.9382954731616941 ns/iter 0.99
JSON_String_Key_Hash/10 1.6675087108832194 ns/iter 1.6720519019051263 ns/iter 1.00
JSON_String_Key_Hash/100 1.9825329532282647 ns/iter 1.9833938168696141 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 2.480507132585995 ns/iter 2.4868816545084376 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 2.4902743915193675 ns/iter 2.487559164888118 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.1041671168647356 ns/iter 3.1083026123365882 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 3.4270651380193042 ns/iter 3.4200216047681904 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.384432558472978 ns/iter 3.420324618534201 ns/iter 0.99
Regex_Period_Asterisk 3.4156911345588914 ns/iter 3.4221783359217475 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 3.388837303096848 ns/iter 3.4248592289371818 ns/iter 0.99
Regex_Period_Plus 3.7267397992338713 ns/iter 3.7407009923171652 ns/iter 1.00
Regex_Period 3.7127247471031084 ns/iter 3.8460206149323177 ns/iter 0.97
Regex_Caret_Period_Plus_Dollar 3.7385552315122257 ns/iter 3.728649868930406 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 3.7998269754375307 ns/iter 3.7299037002839395 ns/iter 1.02
Regex_Caret_Period_Asterisk_Dollar 4.644926304270539 ns/iter 4.660616625146497 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 4.672449920792929 ns/iter 4.661854360740388 ns/iter 1.00
Regex_Caret_X_Hyphen 12.391388297787923 ns/iter 12.429927749345639 ns/iter 1.00
Regex_Period_Md_Dollar 94.72973557323132 ns/iter 96.46869161147598 ns/iter 0.98
Regex_Caret_Slash_Period_Asterisk 8.076504261947115 ns/iter 8.078988843716079 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 4.660969825525254 ns/iter 4.662128751303857 ns/iter 1.00
Regex_Nested_Backtrack 825.6401411006409 ns/iter 860.7069801104158 ns/iter 0.96

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

Please sign in to comment.