Skip to content

Commit

Permalink
Turn schema framing into a class (#1417)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
  • Loading branch information
jviotti authored Jan 2, 2025
1 parent 6667b99 commit 1a6da6d
Show file tree
Hide file tree
Showing 20 changed files with 1,474 additions and 1,774 deletions.
63 changes: 20 additions & 43 deletions src/jsonschema/bundle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,14 @@ auto is_official_metaschema_reference(
auto bundle_schema(sourcemeta::jsontoolkit::JSON &root,
const std::string &container,
const sourcemeta::jsontoolkit::JSON &subschema,
sourcemeta::jsontoolkit::FrameLocations &frame,
sourcemeta::jsontoolkit::FrameReferences &references,
sourcemeta::jsontoolkit::Frame &frame,
const sourcemeta::jsontoolkit::SchemaWalker &walker,
const sourcemeta::jsontoolkit::SchemaResolver &resolver,
const std::optional<std::string> &default_dialect) -> void {
sourcemeta::jsontoolkit::frame(subschema, frame, references, walker, resolver,
default_dialect);
frame.analyse(subschema, walker, resolver, default_dialect);

for (const auto &[key, reference] : references) {
if (frame.contains({sourcemeta::jsontoolkit::ReferenceType::Static,
reference.destination}) ||
frame.contains({sourcemeta::jsontoolkit::ReferenceType::Dynamic,
reference.destination}) ||
for (const auto &[key, reference] : frame.references()) {
if (frame.traverse(reference.destination).has_value() ||

// We don't want to bundle official schemas, as we can expect
// virtually all implementations to understand them out of the box
Expand All @@ -74,15 +69,11 @@ auto bundle_schema(sourcemeta::jsontoolkit::JSON &root,

// If we can't find the destination but there is a base and we can
// find base, then we are facing an unresolved fragment
if (reference.base.has_value()) {
if (frame.contains({sourcemeta::jsontoolkit::ReferenceType::Static,
reference.base.value()}) ||
frame.contains({sourcemeta::jsontoolkit::ReferenceType::Dynamic,
reference.base.value()})) {
throw sourcemeta::jsontoolkit::SchemaReferenceError(
reference.destination, key.second,
"Could not resolve schema reference");
}
if (reference.base.has_value() &&
frame.traverse(reference.base.value()).has_value()) {
throw sourcemeta::jsontoolkit::SchemaReferenceError(
reference.destination, key.second,
"Could not resolve schema reference");
}

root.assign_if_missing(container,
Expand All @@ -98,10 +89,7 @@ auto bundle_schema(sourcemeta::jsontoolkit::JSON &root,
const auto identifier{reference.base.value()};
const auto remote{resolver(identifier)};
if (!remote.has_value()) {
if (frame.contains(
{sourcemeta::jsontoolkit::ReferenceType::Static, identifier}) ||
frame.contains(
{sourcemeta::jsontoolkit::ReferenceType::Dynamic, identifier})) {
if (frame.traverse(identifier).has_value()) {
throw sourcemeta::jsontoolkit::SchemaReferenceError(
reference.destination, key.second,
"Could not resolve schema reference");
Expand Down Expand Up @@ -134,7 +122,7 @@ auto bundle_schema(sourcemeta::jsontoolkit::JSON &root,
}

embed_schema(root.at(container), identifier, copy);
bundle_schema(root, container, copy, frame, references, walker, resolver,
bundle_schema(root, container, copy, frame, walker, resolver,
default_dialect);
}
}
Expand All @@ -145,10 +133,8 @@ auto remove_identifiers(sourcemeta::jsontoolkit::JSON &schema,
const std::optional<std::string> &default_dialect)
-> void {
// (1) Re-frame before changing anything
sourcemeta::jsontoolkit::FrameLocations frame;
sourcemeta::jsontoolkit::FrameReferences references;
sourcemeta::jsontoolkit::frame(schema, frame, references, walker, resolver,
default_dialect);
sourcemeta::jsontoolkit::Frame frame;
frame.analyse(schema, walker, resolver, default_dialect);

// (2) Remove all identifiers and anchors
for (const auto &entry : sourcemeta::jsontoolkit::SchemaIterator{
Expand All @@ -175,28 +161,20 @@ auto remove_identifiers(sourcemeta::jsontoolkit::JSON &schema,
}

// (3) Fix-up reference based on pointers from the root
for (const auto &[key, reference] : references) {
for (const auto &[key, reference] : frame.references()) {
// We don't want to bundle official schemas, as we can expect
// virtually all implementations to understand them out of the box
if (is_official_metaschema_reference(key.second, reference.destination)) {
continue;
}

assert(frame.contains({sourcemeta::jsontoolkit::ReferenceType::Static,
reference.destination}) ||
frame.contains({sourcemeta::jsontoolkit::ReferenceType::Dynamic,
reference.destination}));
const auto &entry{
frame.contains({sourcemeta::jsontoolkit::ReferenceType::Static,
reference.destination})
? frame.at({sourcemeta::jsontoolkit::ReferenceType::Static,
reference.destination})
: frame.at({sourcemeta::jsontoolkit::ReferenceType::Dynamic,
reference.destination})};
const auto result{frame.traverse(reference.destination)};
assert(result.has_value());
sourcemeta::jsontoolkit::set(
schema, key.second,
sourcemeta::jsontoolkit::JSON{
sourcemeta::jsontoolkit::to_uri(entry.pointer).recompose()});
sourcemeta::jsontoolkit::to_uri(result.value().get().pointer)
.recompose()});
}
}

Expand All @@ -209,10 +187,9 @@ auto bundle(sourcemeta::jsontoolkit::JSON &schema, const SchemaWalker &walker,
const std::optional<std::string> &default_dialect) -> void {
const auto vocabularies{
sourcemeta::jsontoolkit::vocabularies(schema, resolver, default_dialect)};
sourcemeta::jsontoolkit::FrameLocations frame;
sourcemeta::jsontoolkit::FrameReferences references;
sourcemeta::jsontoolkit::Frame frame;
bundle_schema(schema, definitions_keyword(vocabularies), schema, frame,
references, walker, resolver, default_dialect);
walker, resolver, default_dialect);

if (options == BundleOptions::WithoutIdentifiers) {
remove_identifiers(schema, walker, resolver, default_dialect);
Expand Down
Loading

8 comments on commit 1a6da6d

@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: 1a6da6d Previous: 6667b99 Ratio
JSON_Array_Of_Objects_Unique 340.6625021848412 ns/iter 360.64912257468245 ns/iter 0.94
JSON_Parse_1 22170.83782495344 ns/iter 23653.79438115162 ns/iter 0.94
JSON_Fast_Hash_Helm_Chart_Lock 47.84275429726775 ns/iter 51.253201128437176 ns/iter 0.93
JSON_Equality_Helm_Chart_Lock 141.8739266102123 ns/iter 142.69416022857365 ns/iter 0.99
Regex_Lower_S_Or_Upper_S_Asterisk 1.5877412574866696 ns/iter 1.6045096805700656 ns/iter 0.99
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.5777901913944548 ns/iter 1.5703066726680281 ns/iter 1.00
Regex_Period_Asterisk 1.6089495676555274 ns/iter 1.5748174212463257 ns/iter 1.02
Regex_Group_Period_Asterisk_Group 1.5825410701252234 ns/iter 1.5918576180073154 ns/iter 0.99
Regex_Period_Plus 1.9281773602416197 ns/iter 1.9054647681817847 ns/iter 1.01
Regex_Period 1.9733444759227408 ns/iter 1.992953358258757 ns/iter 0.99
Regex_Caret_Period_Plus_Dollar 1.9704351780372347 ns/iter 1.9959298735298903 ns/iter 0.99
Regex_Caret_Group_Period_Plus_Group_Dollar 1.9577466392155483 ns/iter 2.0724836296927553 ns/iter 0.94
Regex_Caret_Period_Asterisk_Dollar 1.630208549598389 ns/iter 1.788407284719736 ns/iter 0.91
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.6381790987141764 ns/iter 1.666632092376026 ns/iter 0.98
Regex_Caret_X_Hyphen 6.3898150999911465 ns/iter 6.992695347711883 ns/iter 0.91
Regex_Period_Md_Dollar 71.70319708723638 ns/iter 72.75182007613687 ns/iter 0.99
Regex_Caret_Slash_Period_Asterisk 5.470715000000155 ns/iter 6.992363070129627 ns/iter 0.78
Regex_Caret_Period_Range_Dollar 2.284689368606888 ns/iter 2.133512529836628 ns/iter 1.07
Regex_Nested_Backtrack 760.835397248605 ns/iter 727.012901243631 ns/iter 1.05
Pointer_Object_Traverse 14.86239966618817 ns/iter 14.764054979109073 ns/iter 1.01
Pointer_Object_Try_Traverse 32.11969695858958 ns/iter 31.440202491005927 ns/iter 1.02
Pointer_Push_Back_Pointer_To_Weak_Pointer 180.52178460274192 ns/iter 173.17992659166924 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: 1a6da6d Previous: 6667b99 Ratio
JSON_Array_Of_Objects_Unique 454.3571704729616 ns/iter 432.54453382903506 ns/iter 1.05
JSON_Parse_1 30493.34058378254 ns/iter 30096.75415053666 ns/iter 1.01
JSON_Fast_Hash_Helm_Chart_Lock 54.71200257549506 ns/iter 60.736773425408636 ns/iter 0.90
JSON_Equality_Helm_Chart_Lock 150.12315659323323 ns/iter 149.5472496677341 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 2.209077715288832 ns/iter 2.2101433633174965 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.1984240363835976 ns/iter 2.209297124408009 ns/iter 1.00
Regex_Period_Asterisk 2.212962722031242 ns/iter 2.213277746606503 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.2035402066662066 ns/iter 2.2134752954073185 ns/iter 1.00
Regex_Period_Plus 2.4875245060420785 ns/iter 2.4883742988004802 ns/iter 1.00
Regex_Period 2.4962674492061527 ns/iter 2.2128603211101323 ns/iter 1.13
Regex_Caret_Period_Plus_Dollar 2.4938361420391733 ns/iter 2.2173238376929767 ns/iter 1.12
Regex_Caret_Group_Period_Plus_Group_Dollar 2.48941099516616 ns/iter 2.216469586509374 ns/iter 1.12
Regex_Caret_Period_Asterisk_Dollar 3.418618517618547 ns/iter 2.385101996143657 ns/iter 1.43
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.4192004684764803 ns/iter 2.214756944531751 ns/iter 1.54
Regex_Caret_X_Hyphen 12.57431368918654 ns/iter 13.048791104757349 ns/iter 0.96
Regex_Period_Md_Dollar 73.89973355065311 ns/iter 79.1325106869709 ns/iter 0.93
Regex_Caret_Slash_Period_Asterisk 7.1474103993680576 ns/iter 6.221289086708885 ns/iter 1.15
Regex_Caret_Period_Range_Dollar 3.732957458437576 ns/iter 3.733126920909408 ns/iter 1.00
Regex_Nested_Backtrack 494.7966211526485 ns/iter 500.3022369546572 ns/iter 0.99
Pointer_Object_Traverse 44.934118958557086 ns/iter 44.894431923998305 ns/iter 1.00
Pointer_Object_Try_Traverse 52.43666164324829 ns/iter 52.33582066720902 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 352.1849325468392 ns/iter 380.28636023640075 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 (windows/msvc)

Benchmark suite Current: 1a6da6d Previous: 6667b99 Ratio
JSON_Array_Of_Objects_Unique 420.10982010640726 ns/iter 421.4853427908528 ns/iter 1.00
JSON_Parse_1 81179.37500000038 ns/iter 80318.90624999555 ns/iter 1.01
JSON_Fast_Hash_Helm_Chart_Lock 55.316705357140805 ns/iter 55.53470535714057 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 224.74362500002343 ns/iter 220.66437500001254 ns/iter 1.02
Regex_Lower_S_Or_Upper_S_Asterisk 8.742857103827472 ns/iter 8.444252640874119 ns/iter 1.04
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 7.937290624999704 ns/iter 8.19787228483079 ns/iter 0.97
Regex_Period_Asterisk 7.870813357718728 ns/iter 7.775402643859273 ns/iter 1.01
Regex_Group_Period_Asterisk_Group 8.278830766612309 ns/iter 7.902271205357485 ns/iter 1.05
Regex_Period_Plus 7.814255322256606 ns/iter 7.948154428802565 ns/iter 0.98
Regex_Period 7.833013392856612 ns/iter 8.023016741072198 ns/iter 0.98
Regex_Caret_Period_Plus_Dollar 7.911426339284639 ns/iter 8.044575892857914 ns/iter 0.98
Regex_Caret_Group_Period_Plus_Group_Dollar 8.1273066601469 ns/iter 8.142361570793573 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 8.040729874818753 ns/iter 8.19105665986122 ns/iter 0.98
Regex_Caret_Group_Period_Asterisk_Group_Dollar 8.079165178571657 ns/iter 7.806166036580585 ns/iter 1.03
Regex_Caret_X_Hyphen 11.671503124999205 ns/iter 11.83149107142713 ns/iter 0.99
Regex_Period_Md_Dollar 142.06408963999175 ns/iter 141.68124999999677 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 11.806403571426927 ns/iter 11.874508928571004 ns/iter 0.99
Regex_Caret_Period_Range_Dollar 9.958868749999183 ns/iter 8.771090585844108 ns/iter 1.14
Regex_Nested_Backtrack 586.1799107142319 ns/iter 588.5875892856924 ns/iter 1.00
Pointer_Object_Traverse 56.11527678570586 ns/iter 56.308107142858226 ns/iter 1.00
Pointer_Object_Try_Traverse 75.83090178571743 ns/iter 76.385669642866 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 182.1139716173084 ns/iter 178.0819583536858 ns/iter 1.02

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: 1a6da6d Previous: 6667b99 Ratio
Pointer_Object_Traverse 43.93053639519459 ns/iter 44.442655358362416 ns/iter 0.99
Pointer_Object_Try_Traverse 22.445208078807614 ns/iter 23.494253306557223 ns/iter 0.96
Pointer_Push_Back_Pointer_To_Weak_Pointer 213.36046778352457 ns/iter 213.10647199887742 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 2.4926021009840857 ns/iter 2.4867689628241503 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.488385048522923 ns/iter 2.4866296913992514 ns/iter 1.00
Regex_Period_Asterisk 2.488697824092922 ns/iter 2.4900820195803837 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.486791233937714 ns/iter 2.500625816047421 ns/iter 0.99
Regex_Period_Plus 2.7986096946674897 ns/iter 2.7996740635189394 ns/iter 1.00
Regex_Period 2.799725282772495 ns/iter 2.798593663171218 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 2.800075384777244 ns/iter 2.801115065661819 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 2.799605277078104 ns/iter 2.799230646183924 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 3.730975550774547 ns/iter 3.7366498414245948 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.730193537789501 ns/iter 3.72887042415774 ns/iter 1.00
Regex_Caret_X_Hyphen 12.464309183245597 ns/iter 12.430287154594764 ns/iter 1.00
Regex_Period_Md_Dollar 87.77102214030064 ns/iter 87.76658876557609 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 6.216949519881484 ns/iter 7.1544644729608855 ns/iter 0.87
Regex_Caret_Period_Range_Dollar 4.039302857557168 ns/iter 4.041553739499392 ns/iter 1.00
Regex_Nested_Backtrack 811.0219807483962 ns/iter 812.0105512761013 ns/iter 1.00
JSON_Array_Of_Objects_Unique 378.4471204459956 ns/iter 379.34210943864036 ns/iter 1.00
JSON_Parse_1 32758.15667792248 ns/iter 32831.962390520355 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 63.83986317023322 ns/iter 62.99960128501887 ns/iter 1.01
JSON_Equality_Helm_Chart_Lock 146.62433423383143 ns/iter 145.29841994331204 ns/iter 1.01

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: 1a6da6d Previous: 6667b99 Ratio
JSON_Array_Of_Objects_Unique 468.2803613892782 ns/iter 432.54453382903506 ns/iter 1.08
JSON_Parse_1 30515.170443650513 ns/iter 30096.75415053666 ns/iter 1.01
JSON_Fast_Hash_Helm_Chart_Lock 54.85217615197577 ns/iter 60.736773425408636 ns/iter 0.90
JSON_Equality_Helm_Chart_Lock 149.5508050587914 ns/iter 149.5472496677341 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 2.3077673764171975 ns/iter 2.2101433633174965 ns/iter 1.04
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.206087115235731 ns/iter 2.209297124408009 ns/iter 1.00
Regex_Period_Asterisk 2.4868490753506536 ns/iter 2.213277746606503 ns/iter 1.12
Regex_Group_Period_Asterisk_Group 2.206996362244437 ns/iter 2.2134752954073185 ns/iter 1.00
Regex_Period_Plus 2.7394726219854455 ns/iter 2.4883742988004802 ns/iter 1.10
Regex_Period 2.2143949291531553 ns/iter 2.2128603211101323 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 2.2252429935574805 ns/iter 2.2173238376929767 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 2.212598342157827 ns/iter 2.216469586509374 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 2.4846937877842783 ns/iter 2.385101996143657 ns/iter 1.04
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.4899461975856036 ns/iter 2.214756944531751 ns/iter 1.12
Regex_Caret_X_Hyphen 13.052657733382212 ns/iter 13.048791104757349 ns/iter 1.00
Regex_Period_Md_Dollar 75.60887049893493 ns/iter 79.1325106869709 ns/iter 0.96
Regex_Caret_Slash_Period_Asterisk 7.1455931105507124 ns/iter 6.221289086708885 ns/iter 1.15
Regex_Caret_Period_Range_Dollar 2.531604194839344 ns/iter 3.733126920909408 ns/iter 0.68
Regex_Nested_Backtrack 488.3848863779664 ns/iter 500.3022369546572 ns/iter 0.98
Pointer_Object_Traverse 44.802587607877044 ns/iter 44.894431923998305 ns/iter 1.00
Pointer_Object_Try_Traverse 52.289761550833944 ns/iter 52.33582066720902 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 351.80301538353433 ns/iter 380.28636023640075 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 (macos/llvm)

Benchmark suite Current: 1a6da6d Previous: 6667b99 Ratio
JSON_Array_Of_Objects_Unique 331.70046062786145 ns/iter 360.64912257468245 ns/iter 0.92
JSON_Parse_1 21356.25038047383 ns/iter 23653.79438115162 ns/iter 0.90
JSON_Fast_Hash_Helm_Chart_Lock 47.67208385950813 ns/iter 51.253201128437176 ns/iter 0.93
JSON_Equality_Helm_Chart_Lock 139.7911973177559 ns/iter 142.69416022857365 ns/iter 0.98
Regex_Lower_S_Or_Upper_S_Asterisk 1.5689072916026028 ns/iter 1.6045096805700656 ns/iter 0.98
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.5698950122230781 ns/iter 1.5703066726680281 ns/iter 1.00
Regex_Period_Asterisk 1.569736139325377 ns/iter 1.5748174212463257 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 1.6620222074223656 ns/iter 1.5918576180073154 ns/iter 1.04
Regex_Period_Plus 1.9008268133158577 ns/iter 1.9054647681817847 ns/iter 1.00
Regex_Period 2.0175798981743736 ns/iter 1.992953358258757 ns/iter 1.01
Regex_Caret_Period_Plus_Dollar 1.9916746586339862 ns/iter 1.9959298735298903 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 1.9419252366861217 ns/iter 2.0724836296927553 ns/iter 0.94
Regex_Caret_Period_Asterisk_Dollar 1.5770659764426913 ns/iter 1.788407284719736 ns/iter 0.88
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.5838795660592926 ns/iter 1.666632092376026 ns/iter 0.95
Regex_Caret_X_Hyphen 6.299122697654158 ns/iter 6.992695347711883 ns/iter 0.90
Regex_Period_Md_Dollar 67.3311467068579 ns/iter 72.75182007613687 ns/iter 0.93
Regex_Caret_Slash_Period_Asterisk 4.959500037574135 ns/iter 6.992363070129627 ns/iter 0.71
Regex_Caret_Period_Range_Dollar 2.0530541250228946 ns/iter 2.133512529836628 ns/iter 0.96
Regex_Nested_Backtrack 725.3868097788683 ns/iter 727.012901243631 ns/iter 1.00
Pointer_Object_Traverse 14.74351217170278 ns/iter 14.764054979109073 ns/iter 1.00
Pointer_Object_Try_Traverse 31.22532167329404 ns/iter 31.440202491005927 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 179.24413054067514 ns/iter 173.17992659166924 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 (windows/msvc)

Benchmark suite Current: 1a6da6d Previous: 6667b99 Ratio
JSON_Array_Of_Objects_Unique 425.66380534927515 ns/iter 421.4853427908528 ns/iter 1.01
JSON_Parse_1 80132.55658228703 ns/iter 80318.90624999555 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 55.91961999999739 ns/iter 55.53470535714057 ns/iter 1.01
JSON_Equality_Helm_Chart_Lock 215.80234375001336 ns/iter 220.66437500001254 ns/iter 0.98
Regex_Lower_S_Or_Upper_S_Asterisk 8.090458705357152 ns/iter 8.444252640874119 ns/iter 0.96
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 8.245396838191114 ns/iter 8.19787228483079 ns/iter 1.01
Regex_Period_Asterisk 7.862862018470468 ns/iter 7.775402643859273 ns/iter 1.01
Regex_Group_Period_Asterisk_Group 8.009217821387933 ns/iter 7.902271205357485 ns/iter 1.01
Regex_Period_Plus 8.076167410714215 ns/iter 7.948154428802565 ns/iter 1.02
Regex_Period 7.760551304638835 ns/iter 8.023016741072198 ns/iter 0.97
Regex_Caret_Period_Plus_Dollar 8.141049070798179 ns/iter 8.044575892857914 ns/iter 1.01
Regex_Caret_Group_Period_Plus_Group_Dollar 8.089856213883994 ns/iter 8.142361570793573 ns/iter 0.99
Regex_Caret_Period_Asterisk_Dollar 7.782944196428332 ns/iter 8.19105665986122 ns/iter 0.95
Regex_Caret_Group_Period_Asterisk_Group_Dollar 7.961560267857643 ns/iter 7.806166036580585 ns/iter 1.02
Regex_Caret_X_Hyphen 11.807637499998691 ns/iter 11.83149107142713 ns/iter 1.00
Regex_Period_Md_Dollar 144.80509174976137 ns/iter 141.68124999999677 ns/iter 1.02
Regex_Caret_Slash_Period_Asterisk 11.673216071431268 ns/iter 11.874508928571004 ns/iter 0.98
Regex_Caret_Period_Range_Dollar 8.720276562499407 ns/iter 8.771090585844108 ns/iter 0.99
Regex_Nested_Backtrack 587.2159821428065 ns/iter 588.5875892856924 ns/iter 1.00
Pointer_Object_Traverse 55.90580357142423 ns/iter 56.308107142858226 ns/iter 0.99
Pointer_Object_Try_Traverse 75.83641071428409 ns/iter 76.385669642866 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 183.677453899804 ns/iter 178.0819583536858 ns/iter 1.03

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: 1a6da6d Previous: 6667b99 Ratio
Pointer_Object_Traverse 44.86455005869972 ns/iter 44.442655358362416 ns/iter 1.01
Pointer_Object_Try_Traverse 22.415210210587375 ns/iter 23.494253306557223 ns/iter 0.95
Pointer_Push_Back_Pointer_To_Weak_Pointer 213.11336375396135 ns/iter 213.10647199887742 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 2.486108021456431 ns/iter 2.4867689628241503 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.511950608042351 ns/iter 2.4866296913992514 ns/iter 1.01
Regex_Period_Asterisk 2.485901145056639 ns/iter 2.4900820195803837 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.4866709813680306 ns/iter 2.500625816047421 ns/iter 0.99
Regex_Period_Plus 2.7969910828773945 ns/iter 2.7996740635189394 ns/iter 1.00
Regex_Period 2.7962383806899296 ns/iter 2.798593663171218 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 2.79607152744862 ns/iter 2.801115065661819 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 2.7978156981145927 ns/iter 2.799230646183924 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 3.7275587745924756 ns/iter 3.7366498414245948 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.726986101631098 ns/iter 3.72887042415774 ns/iter 1.00
Regex_Caret_X_Hyphen 12.43077442394182 ns/iter 12.430287154594764 ns/iter 1.00
Regex_Period_Md_Dollar 87.85639064810994 ns/iter 87.76658876557609 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 7.145894410263686 ns/iter 7.1544644729608855 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 4.0394574433209085 ns/iter 4.041553739499392 ns/iter 1.00
Regex_Nested_Backtrack 824.3263590055949 ns/iter 812.0105512761013 ns/iter 1.02
JSON_Array_Of_Objects_Unique 379.86118606071835 ns/iter 379.34210943864036 ns/iter 1.00
JSON_Parse_1 32792.08818143424 ns/iter 32831.962390520355 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 57.52142642673832 ns/iter 62.99960128501887 ns/iter 0.91
JSON_Equality_Helm_Chart_Lock 144.7349230531583 ns/iter 145.29841994331204 ns/iter 1.00

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

Please sign in to comment.