Skip to content

Commit

Permalink
Implement a .contains() method for JSON strings (#1431)
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 10, 2025
1 parent 4b04d73 commit 74edf62
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/json/include/sourcemeta/jsontoolkit/json_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,32 @@ class SOURCEMETA_JSONTOOLKIT_JSON_EXPORT JSON {
/// ```
[[nodiscard]] auto contains(const JSON &element) const -> bool;

/// This method checks if an JSON string contains a given string. For
/// example:
///
/// ```cpp
/// #include <sourcemeta/jsontoolkit/json.h>
/// #include <cassert>
///
/// const sourcemeta::jsontoolkit::JSON document{"foo bar baz"};
/// assert(document.contains("bar"));
/// assert(!document.contains("baz"));
/// ```
[[nodiscard]] auto contains(const String &input) const -> bool;

/// This method checks if an JSON string contains a given character. For
/// example:
///
/// ```cpp
/// #include <sourcemeta/jsontoolkit/json.h>
/// #include <cassert>
///
/// const sourcemeta::jsontoolkit::JSON document{"foo"};
/// assert(document.contains('f'));
/// assert(!document.contains('b'));
/// ```
[[nodiscard]] auto contains(const String::value_type input) const -> bool;

/// This method checks if an JSON array does not contain duplicated items. For
/// example:
///
Expand Down
11 changes: 11 additions & 0 deletions src/json/json_value.cc
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,17 @@ JSON::defines_any(std::initializer_list<JSON::String> keys) const -> bool {
element) != this->as_array().cend();
}

[[nodiscard]] auto JSON::contains(const JSON::String &input) const -> bool {
assert(this->is_string());
return this->to_string().find(input) != JSON::String::npos;
}

[[nodiscard]] auto JSON::contains(const JSON::String::value_type input) const
-> bool {
assert(this->is_string());
return this->to_string().find(input) != JSON::String::npos;
}

[[nodiscard]] auto JSON::unique() const -> bool {
assert(this->is_array());
const auto &items{this->data_array.data};
Expand Down
20 changes: 20 additions & 0 deletions test/json/json_string_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,23 @@ TEST(JSON_string, unicode_length_1) {
// https://unicodeplus.com/U+7EAF (UTF-8: 0xE7 0xBA 0xAF)
EXPECT_EQ(document.at("name").byte_size(), 9);
}

TEST(JSON_string, contains_true) {
const sourcemeta::jsontoolkit::JSON document{"foo bar baz"};
EXPECT_TRUE(document.contains("foo"));
}

TEST(JSON_string, contains_false) {
const sourcemeta::jsontoolkit::JSON document{"foo bar baz"};
EXPECT_FALSE(document.contains("fooo"));
}

TEST(JSON_string, contains_character_true) {
const sourcemeta::jsontoolkit::JSON document{"foo"};
EXPECT_TRUE(document.contains('f'));
}

TEST(JSON_string, contains_character_false) {
const sourcemeta::jsontoolkit::JSON document{"foo"};
EXPECT_FALSE(document.contains('b'));
}

8 comments on commit 74edf62

@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: 74edf62 Previous: 4b04d73 Ratio
JSON_Array_Of_Objects_Unique 345.5599624082129 ns/iter 342.6489024557436 ns/iter 1.01
JSON_Parse_1 22788.1029444971 ns/iter 21705.226241549248 ns/iter 1.05
JSON_Fast_Hash_Helm_Chart_Lock 51.12226054549295 ns/iter 51.44898973050822 ns/iter 0.99
JSON_Equality_Helm_Chart_Lock 138.80016077063746 ns/iter 131.93544163518078 ns/iter 1.05
Regex_Lower_S_Or_Upper_S_Asterisk 1.6754539607967196 ns/iter 1.5694098007288662 ns/iter 1.07
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.673942250140308 ns/iter 1.5747650687678212 ns/iter 1.06
Regex_Period_Asterisk 1.7322030921514044 ns/iter 1.5713696147351714 ns/iter 1.10
Regex_Group_Period_Asterisk_Group 1.6677447414471205 ns/iter 1.5720335801048975 ns/iter 1.06
Regex_Period_Plus 2.050592831600103 ns/iter 1.8900372415409974 ns/iter 1.08
Regex_Period 1.9763232803750308 ns/iter 1.8855641136840815 ns/iter 1.05
Regex_Caret_Period_Plus_Dollar 1.927817331876842 ns/iter 1.8848963733772441 ns/iter 1.02
Regex_Caret_Group_Period_Plus_Group_Dollar 1.9822846670478862 ns/iter 1.8852162281215603 ns/iter 1.05
Regex_Caret_Period_Asterisk_Dollar 1.654169037772479 ns/iter 1.5692751711659874 ns/iter 1.05
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.5894695983464244 ns/iter 1.570022786134582 ns/iter 1.01
Regex_Caret_X_Hyphen 6.474143645404102 ns/iter 6.30523988713433 ns/iter 1.03
Regex_Period_Md_Dollar 71.18644733828347 ns/iter 69.48670971486591 ns/iter 1.02
Regex_Caret_Slash_Period_Asterisk 6.127809216815011 ns/iter 6.710547224593167 ns/iter 0.91
Regex_Caret_Period_Range_Dollar 2.1766841476606786 ns/iter 2.0361345717246513 ns/iter 1.07
Regex_Nested_Backtrack 784.5408326803114 ns/iter 725.8954708932023 ns/iter 1.08
Pointer_Object_Traverse 16.896504366353373 ns/iter 15.247473910253499 ns/iter 1.11
Pointer_Object_Try_Traverse 33.49819506497382 ns/iter 31.508737475598654 ns/iter 1.06
Pointer_Push_Back_Pointer_To_Weak_Pointer 179.74346485280174 ns/iter 173.22369903074818 ns/iter 1.04

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: 74edf62 Previous: 4b04d73 Ratio
JSON_Array_Of_Objects_Unique 531.3838675146837 ns/iter 445.1658283192557 ns/iter 1.19
JSON_Parse_1 29865.421645610975 ns/iter 29969.246862281914 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 124.81094345733217 ns/iter 54.69452167440643 ns/iter 2.28
JSON_Equality_Helm_Chart_Lock 143.99038950535223 ns/iter 145.74450222918298 ns/iter 0.99
Regex_Lower_S_Or_Upper_S_Asterisk 2.226054295923506 ns/iter 2.20022864160664 ns/iter 1.01
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.190446327839448 ns/iter 2.193531428313369 ns/iter 1.00
Regex_Period_Asterisk 2.195006432717628 ns/iter 2.2128287716203614 ns/iter 0.99
Regex_Group_Period_Asterisk_Group 2.195752303351229 ns/iter 2.191307434774555 ns/iter 1.00
Regex_Period_Plus 2.8033055954103623 ns/iter 2.486323042170805 ns/iter 1.13
Regex_Period 2.7960589635824014 ns/iter 2.4859844836476954 ns/iter 1.12
Regex_Caret_Period_Plus_Dollar 2.7965655380307433 ns/iter 2.2710142581093438 ns/iter 1.23
Regex_Caret_Group_Period_Plus_Group_Dollar 2.797075639250317 ns/iter 2.2765616233953105 ns/iter 1.23
Regex_Caret_Period_Asterisk_Dollar 3.417313585951194 ns/iter 2.48695450832223 ns/iter 1.37
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.419861663267074 ns/iter 2.4861893176483925 ns/iter 1.38
Regex_Caret_X_Hyphen 12.647025336496508 ns/iter 12.52856247108536 ns/iter 1.01
Regex_Period_Md_Dollar 73.81224503554736 ns/iter 73.70581651740909 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 6.526870521860383 ns/iter 7.149466252312237 ns/iter 0.91
Regex_Caret_Period_Range_Dollar 4.042429979949761 ns/iter 2.4938970230158755 ns/iter 1.62
Regex_Nested_Backtrack 521.3237557120449 ns/iter 491.679554149494 ns/iter 1.06
Pointer_Object_Traverse 44.23427922929643 ns/iter 44.788569441834994 ns/iter 0.99
Pointer_Object_Try_Traverse 52.76546648734447 ns/iter 53.193323097873595 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 352.3415806592013 ns/iter 354.7159460770064 ns/iter 0.99

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: 74edf62 Previous: 4b04d73 Ratio
JSON_Array_Of_Objects_Unique 416.2350181617304 ns/iter 435.00737500011155 ns/iter 0.96
JSON_Parse_1 79456.54017856694 ns/iter 83702.96874998319 ns/iter 0.95
JSON_Fast_Hash_Helm_Chart_Lock 53.64400000000842 ns/iter 59.704940000006 ns/iter 0.90
JSON_Equality_Helm_Chart_Lock 225.75624999998212 ns/iter 228.0587357077244 ns/iter 0.99
Regex_Lower_S_Or_Upper_S_Asterisk 8.313941480741248 ns/iter 8.532138392856682 ns/iter 0.97
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 8.234852641808677 ns/iter 8.04193255338269 ns/iter 1.02
Regex_Period_Asterisk 8.400391033926665 ns/iter 8.327903534250876 ns/iter 1.01
Regex_Group_Period_Asterisk_Group 7.774197544641988 ns/iter 8.034918526784095 ns/iter 0.97
Regex_Period_Plus 7.8338785364560275 ns/iter 8.135332999397985 ns/iter 0.96
Regex_Period 8.095129464285986 ns/iter 8.051205767629174 ns/iter 1.01
Regex_Caret_Period_Plus_Dollar 7.781695312499995 ns/iter 7.912025857533314 ns/iter 0.98
Regex_Caret_Group_Period_Plus_Group_Dollar 8.128320499426898 ns/iter 8.832472728425117 ns/iter 0.92
Regex_Caret_Period_Asterisk_Dollar 8.025495499886402 ns/iter 7.789064062500017 ns/iter 1.03
Regex_Caret_Group_Period_Asterisk_Group_Dollar 7.776171874999603 ns/iter 8.23741737394046 ns/iter 0.94
Regex_Caret_X_Hyphen 12.138887500000807 ns/iter 11.566604687502036 ns/iter 1.05
Regex_Period_Md_Dollar 142.47543783593028 ns/iter 142.00964767811402 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 11.67928035714283 ns/iter 11.935163116364066 ns/iter 0.98
Regex_Caret_Period_Range_Dollar 8.700463354015962 ns/iter 8.964932102834474 ns/iter 0.97
Regex_Nested_Backtrack 589.8316071428513 ns/iter 586.6695535713365 ns/iter 1.01
Pointer_Object_Traverse 56.45785000000387 ns/iter 55.89243749998981 ns/iter 1.01
Pointer_Object_Try_Traverse 75.74072544643025 ns/iter 75.99424107141317 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 176.9836765163786 ns/iter 191.31794565335926 ns/iter 0.93

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: 74edf62 Previous: 4b04d73 Ratio
Pointer_Object_Traverse 44.09603547947162 ns/iter 50.18702809651256 ns/iter 0.88
Pointer_Object_Try_Traverse 22.423625843284626 ns/iter 24.622513914266523 ns/iter 0.91
Pointer_Push_Back_Pointer_To_Weak_Pointer 214.08581901279234 ns/iter 213.17270709021975 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 3.1366170253528765 ns/iter 3.1231955616085556 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.123526619636233 ns/iter 3.130828609019674 ns/iter 1.00
Regex_Period_Asterisk 3.1271336081497276 ns/iter 3.122312645712708 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 3.1344342068596927 ns/iter 3.122895313002317 ns/iter 1.00
Regex_Period_Plus 3.1226219887236892 ns/iter 3.1273323382859193 ns/iter 1.00
Regex_Period 3.128748324632939 ns/iter 3.126788947460779 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 3.1346871531291507 ns/iter 3.1316186871732135 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 3.128460984644729 ns/iter 3.1233518534670113 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 3.7294113678928533 ns/iter 3.1290650749377256 ns/iter 1.19
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.7330462672094815 ns/iter 3.126457674540122 ns/iter 1.19
Regex_Caret_X_Hyphen 12.43268021628107 ns/iter 12.431149374894764 ns/iter 1.00
Regex_Period_Md_Dollar 89.1613944110879 ns/iter 89.25451018058364 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 7.147613919207099 ns/iter 7.14604530308933 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 4.040605990707221 ns/iter 4.039906061789911 ns/iter 1.00
Regex_Nested_Backtrack 820.5089142983219 ns/iter 833.3509879230805 ns/iter 0.98
JSON_Array_Of_Objects_Unique 380.7941465886984 ns/iter 377.4044799985154 ns/iter 1.01
JSON_Parse_1 33198.954852518385 ns/iter 33185.93026466167 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 62.63993099608115 ns/iter 62.94871641328834 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 142.9680577815802 ns/iter 146.9782408346559 ns/iter 0.97

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: 74edf62 Previous: 4b04d73 Ratio
JSON_Array_Of_Objects_Unique 411.79655914683343 ns/iter 445.1658283192557 ns/iter 0.93
JSON_Parse_1 29773.384881782105 ns/iter 29969.246862281914 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 58.793479116985246 ns/iter 54.69452167440643 ns/iter 1.07
JSON_Equality_Helm_Chart_Lock 141.04137149545704 ns/iter 145.74450222918298 ns/iter 0.97
Regex_Lower_S_Or_Upper_S_Asterisk 2.185260185690387 ns/iter 2.20022864160664 ns/iter 0.99
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.183809137503474 ns/iter 2.193531428313369 ns/iter 1.00
Regex_Period_Asterisk 2.1849037028794163 ns/iter 2.2128287716203614 ns/iter 0.99
Regex_Group_Period_Asterisk_Group 2.182998025905136 ns/iter 2.191307434774555 ns/iter 1.00
Regex_Period_Plus 2.4904911256288735 ns/iter 2.486323042170805 ns/iter 1.00
Regex_Period 2.5015406408885403 ns/iter 2.4859844836476954 ns/iter 1.01
Regex_Caret_Period_Plus_Dollar 2.490430975466031 ns/iter 2.2710142581093438 ns/iter 1.10
Regex_Caret_Group_Period_Plus_Group_Dollar 2.491379014885423 ns/iter 2.2765616233953105 ns/iter 1.09
Regex_Caret_Period_Asterisk_Dollar 2.4919708549170605 ns/iter 2.48695450832223 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.182136960046927 ns/iter 2.4861893176483925 ns/iter 0.88
Regex_Caret_X_Hyphen 12.632807772915976 ns/iter 12.52856247108536 ns/iter 1.01
Regex_Period_Md_Dollar 73.55266047175674 ns/iter 73.70581651740909 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 5.282843369847085 ns/iter 7.149466252312237 ns/iter 0.74
Regex_Caret_Period_Range_Dollar 2.801547513136593 ns/iter 2.4938970230158755 ns/iter 1.12
Regex_Nested_Backtrack 503.72623662005947 ns/iter 491.679554149494 ns/iter 1.02
Pointer_Object_Traverse 44.655462835750214 ns/iter 44.788569441834994 ns/iter 1.00
Pointer_Object_Try_Traverse 52.56762146059341 ns/iter 53.193323097873595 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 352.06734228302963 ns/iter 354.7159460770064 ns/iter 0.99

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

Benchmark suite Current: 74edf62 Previous: 4b04d73 Ratio
JSON_Array_Of_Objects_Unique 377.36759105936306 ns/iter 342.6489024557436 ns/iter 1.10
JSON_Parse_1 23355.16459815158 ns/iter 21705.226241549248 ns/iter 1.08
JSON_Fast_Hash_Helm_Chart_Lock 51.40338031724124 ns/iter 51.44898973050822 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 144.99777456858735 ns/iter 131.93544163518078 ns/iter 1.10
Regex_Lower_S_Or_Upper_S_Asterisk 1.7085681224589777 ns/iter 1.5694098007288662 ns/iter 1.09
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.7089753310598566 ns/iter 1.5747650687678212 ns/iter 1.09
Regex_Period_Asterisk 2.127068787775394 ns/iter 1.5713696147351714 ns/iter 1.35
Regex_Group_Period_Asterisk_Group 1.779124576327936 ns/iter 1.5720335801048975 ns/iter 1.13
Regex_Period_Plus 2.2541513785785376 ns/iter 1.8900372415409974 ns/iter 1.19
Regex_Period 2.14886565846379 ns/iter 1.8855641136840815 ns/iter 1.14
Regex_Caret_Period_Plus_Dollar 2.02169548662943 ns/iter 1.8848963733772441 ns/iter 1.07
Regex_Caret_Group_Period_Plus_Group_Dollar 2.0563152945791376 ns/iter 1.8852162281215603 ns/iter 1.09
Regex_Caret_Period_Asterisk_Dollar 1.7320459923050406 ns/iter 1.5692751711659874 ns/iter 1.10
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.7618077516372965 ns/iter 1.570022786134582 ns/iter 1.12
Regex_Caret_X_Hyphen 7.005609672977873 ns/iter 6.30523988713433 ns/iter 1.11
Regex_Period_Md_Dollar 73.20043099253255 ns/iter 69.48670971486591 ns/iter 1.05
Regex_Caret_Slash_Period_Asterisk 5.7324555372269534 ns/iter 6.710547224593167 ns/iter 0.85
Regex_Caret_Period_Range_Dollar 2.240132881939963 ns/iter 2.0361345717246513 ns/iter 1.10
Regex_Nested_Backtrack 776.731504365721 ns/iter 725.8954708932023 ns/iter 1.07
Pointer_Object_Traverse 16.565994456988918 ns/iter 15.247473910253499 ns/iter 1.09
Pointer_Object_Try_Traverse 35.05817213188984 ns/iter 31.508737475598654 ns/iter 1.11
Pointer_Push_Back_Pointer_To_Weak_Pointer 215.45805620954178 ns/iter 173.22369903074818 ns/iter 1.24

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: 74edf62 Previous: 4b04d73 Ratio
JSON_Array_Of_Objects_Unique 417.2314870673658 ns/iter 435.00737500011155 ns/iter 0.96
JSON_Parse_1 97255.76536761683 ns/iter 83702.96874998319 ns/iter 1.16
JSON_Fast_Hash_Helm_Chart_Lock 58.947960000000414 ns/iter 59.704940000006 ns/iter 0.99
JSON_Equality_Helm_Chart_Lock 216.43504614130092 ns/iter 228.0587357077244 ns/iter 0.95
Regex_Lower_S_Or_Upper_S_Asterisk 8.092671392442448 ns/iter 8.532138392856682 ns/iter 0.95
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 8.034435937499751 ns/iter 8.04193255338269 ns/iter 1.00
Regex_Period_Asterisk 7.903838804000683 ns/iter 8.327903534250876 ns/iter 0.95
Regex_Group_Period_Asterisk_Group 8.067917374697256 ns/iter 8.034918526784095 ns/iter 1.00
Regex_Period_Plus 8.375778980464977 ns/iter 8.135332999397985 ns/iter 1.03
Regex_Period 8.037340142690908 ns/iter 8.051205767629174 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 7.892258000479893 ns/iter 7.912025857533314 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 8.063392857143066 ns/iter 8.832472728425117 ns/iter 0.91
Regex_Caret_Period_Asterisk_Dollar 8.068423624694631 ns/iter 7.789064062500017 ns/iter 1.04
Regex_Caret_Group_Period_Asterisk_Group_Dollar 7.778499072417284 ns/iter 8.23741737394046 ns/iter 0.94
Regex_Caret_X_Hyphen 11.636026785713023 ns/iter 11.566604687502036 ns/iter 1.01
Regex_Period_Md_Dollar 141.7390651009447 ns/iter 142.00964767811402 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 11.781008928571573 ns/iter 11.935163116364066 ns/iter 0.99
Regex_Caret_Period_Range_Dollar 8.717446874999979 ns/iter 8.964932102834474 ns/iter 0.97
Regex_Nested_Backtrack 587.2363392856731 ns/iter 586.6695535713365 ns/iter 1.00
Pointer_Object_Traverse 55.951062499996084 ns/iter 55.89243749998981 ns/iter 1.00
Pointer_Object_Try_Traverse 75.96493750000377 ns/iter 75.99424107141317 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 187.01165955462739 ns/iter 191.31794565335926 ns/iter 0.98

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: 74edf62 Previous: 4b04d73 Ratio
Pointer_Object_Traverse 44.607226956664306 ns/iter 50.18702809651256 ns/iter 0.89
Pointer_Object_Try_Traverse 22.407520959005684 ns/iter 24.622513914266523 ns/iter 0.91
Pointer_Push_Back_Pointer_To_Weak_Pointer 213.38891314915742 ns/iter 213.17270709021975 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 3.15171849102477 ns/iter 3.1231955616085556 ns/iter 1.01
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.184290436701411 ns/iter 3.130828609019674 ns/iter 1.02
Regex_Period_Asterisk 3.173268089776138 ns/iter 3.122312645712708 ns/iter 1.02
Regex_Group_Period_Asterisk_Group 3.180854284983809 ns/iter 3.122895313002317 ns/iter 1.02
Regex_Period_Plus 3.2256668918239777 ns/iter 3.1273323382859193 ns/iter 1.03
Regex_Period 3.182333821778798 ns/iter 3.126788947460779 ns/iter 1.02
Regex_Caret_Period_Plus_Dollar 3.2102564579964334 ns/iter 3.1316186871732135 ns/iter 1.03
Regex_Caret_Group_Period_Plus_Group_Dollar 3.2488232290733463 ns/iter 3.1233518534670113 ns/iter 1.04
Regex_Caret_Period_Asterisk_Dollar 3.729023152639788 ns/iter 3.1290650749377256 ns/iter 1.19
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.73062854068865 ns/iter 3.126457674540122 ns/iter 1.19
Regex_Caret_X_Hyphen 12.430397409403934 ns/iter 12.431149374894764 ns/iter 1.00
Regex_Period_Md_Dollar 89.91983971334406 ns/iter 89.25451018058364 ns/iter 1.01
Regex_Caret_Slash_Period_Asterisk 7.14693758627552 ns/iter 7.14604530308933 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 4.040087495446088 ns/iter 4.039906061789911 ns/iter 1.00
Regex_Nested_Backtrack 831.1598958436795 ns/iter 833.3509879230805 ns/iter 1.00
JSON_Array_Of_Objects_Unique 379.9148649203714 ns/iter 377.4044799985154 ns/iter 1.01
JSON_Parse_1 32737.0110809825 ns/iter 33185.93026466167 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 63.080756695917785 ns/iter 62.94871641328834 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 143.90437202286466 ns/iter 146.9782408346559 ns/iter 0.98

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

Please sign in to comment.