Skip to content

Commit

Permalink
Track evaluation depth as a recursive argument (#201)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Nov 21, 2024
1 parent 6ba7628 commit 21b2224
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 62 deletions.
26 changes: 2 additions & 24 deletions src/evaluator/context.cc
Original file line number Diff line number Diff line change
@@ -1,38 +1,18 @@
#include <sourcemeta/blaze/evaluator_context.h>
#include <sourcemeta/blaze/evaluator_error.h>

#include <cassert> // assert

namespace sourcemeta::blaze {

// TODO: Completely inline push/pop

auto EvaluationContext::push(
const sourcemeta::jsontoolkit::Pointer &relative_schema_location,
const sourcemeta::jsontoolkit::Pointer &relative_instance_location,
const bool track) -> void {
// Guard against infinite recursion in a cheap manner, as
// infinite recursion will manifest itself through huge
// ever-growing evaluate paths
constexpr auto EVALUATE_PATH_LIMIT{300};

if (track) {
if (this->evaluate_path.size() > EVALUATE_PATH_LIMIT) [[unlikely]] {
throw sourcemeta::blaze::EvaluationError(
"The evaluation path depth limit was reached "
"likely due to infinite recursion");
}

this->evaluate_path.push_back(relative_schema_location);
this->instance_location.push_back(relative_instance_location);
} else {
if (this->evaluate_path_size > EVALUATE_PATH_LIMIT) [[unlikely]] {
throw sourcemeta::blaze::EvaluationError(
"The evaluation path depth limit was reached "
"likely due to infinite recursion");
}

// We still need to somewhat keep track of this to prevent infinite
// recursion
this->evaluate_path_size += relative_schema_location.size();
}
}

Expand All @@ -42,8 +22,6 @@ auto EvaluationContext::pop(const std::size_t relative_schema_location_size,
if (track) {
this->evaluate_path.pop_back(relative_schema_location_size);
this->instance_location.pop_back(relative_instance_location_size);
} else {
this->evaluate_path_size -= relative_schema_location_size;
}
}

Expand Down
79 changes: 47 additions & 32 deletions src/evaluator/dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ HANDLER_START {
result = true;
assert(std::holds_alternative<ControlGroup>(entry));
for (const auto &child : std::get<ControlGroup>(entry).children) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = false;
break;
}
Expand All @@ -416,7 +417,8 @@ HANDLER_START {
result = true;
assert(std::holds_alternative<ControlGroup>(entry));
for (const auto &child : std::get<ControlGroup>(entry).children) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = false;
EVALUATE_END(assertion, AssertionArrayPrefixEvaluate);
}
Expand All @@ -439,7 +441,8 @@ HANDLER_START {
const auto &target{sourcemeta::jsontoolkit::get(
instance, logical.relative_instance_location)};
for (const auto &child : logical.children) {
if (evaluate_step(child, callback, target, property_target, context)) {
if (evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = true;
// This boolean value controls whether we should be exhaustive
if (!logical.value) {
Expand All @@ -457,7 +460,8 @@ HANDLER_START {
const auto &target{sourcemeta::jsontoolkit::get(
instance, logical.relative_instance_location)};
for (const auto &child : logical.children) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = false;
break;
}
Expand All @@ -470,7 +474,8 @@ HANDLER_START {
EVALUATE_BEGIN(logical, LogicalWhenType, target.type() == logical.value);
result = true;
for (const auto &child : logical.children) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = false;
break;
}
Expand All @@ -484,7 +489,8 @@ HANDLER_START {
target.is_object() && target.defines(logical.value));
result = true;
for (const auto &child : logical.children) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = false;
break;
}
Expand All @@ -498,7 +504,8 @@ HANDLER_START {
target.is_array() && target.size() > logical.value);
result = true;
for (const auto &child : logical.children) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = false;
break;
}
Expand All @@ -514,7 +521,8 @@ HANDLER_START {
const auto &target{sourcemeta::jsontoolkit::get(
instance, logical.relative_instance_location)};
for (const auto &child : logical.children) {
if (evaluate_step(child, callback, target, property_target, context)) {
if (evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
if (has_matched) {
result = false;
// This boolean value controls whether we should be exhaustive
Expand Down Expand Up @@ -549,7 +557,7 @@ HANDLER_START {
instance, logical.relative_instance_location)};
for (std::size_t cursor = 0; cursor < condition_end; cursor++) {
if (!evaluate_step(logical.children[cursor], callback, target,
property_target, context)) {
property_target, depth + 1, context)) {
result = false;
break;
}
Expand All @@ -568,7 +576,7 @@ HANDLER_START {
for (auto cursor = consequence_start; cursor < consequence_end;
cursor++) {
if (!evaluate_step(logical.children[cursor], callback, instance,
property_target, context)) {
property_target, depth + 1, context)) {
result = false;
break;
}
Expand All @@ -579,7 +587,7 @@ HANDLER_START {
for (auto cursor = consequence_start; cursor < consequence_end;
cursor++) {
if (!evaluate_step(logical.children[cursor], callback, instance,
property_target, context)) {
property_target, depth + 1, context)) {
result = false;
break;
}
Expand All @@ -593,7 +601,8 @@ HANDLER_START {
case IS_STEP(ControlGroup): {
EVALUATE_BEGIN_PASS_THROUGH(control, ControlGroup);
for (const auto &child : control.children) {
if (!evaluate_step(child, callback, instance, property_target, context)) {
if (!evaluate_step(child, callback, instance, property_target, depth + 1,
context)) {
result = false;
break;
}
Expand All @@ -617,7 +626,7 @@ HANDLER_START {
// Note that in this control instruction, we purposely
// don't navigate into the target
if (!evaluate_step(child, callback, instance, property_target,
context)) {
depth + 1, context)) {
result = false;
break;
}
Expand All @@ -635,7 +644,8 @@ HANDLER_START {
instance, control.relative_instance_location)};
result = true;
for (const auto &child : control.children) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = false;
break;
}
Expand Down Expand Up @@ -676,7 +686,8 @@ HANDLER_START {
const auto &target{sourcemeta::jsontoolkit::get(
instance, control.relative_instance_location)};
for (const auto &child : context.labels.at(control.value).get()) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = false;
break;
}
Expand All @@ -697,7 +708,7 @@ HANDLER_START {
result = true;
for (const auto &child : match->second.get()) {
if (!evaluate_step(child, callback, target, property_target,
context)) {
depth + 1, context)) {
result = false;
EVALUATE_END(control, ControlDynamicAnchorJump);
}
Expand Down Expand Up @@ -736,7 +747,8 @@ HANDLER_START {
const auto &target{sourcemeta::jsontoolkit::get(
instance, logical.relative_instance_location)};
for (const auto &child : logical.children) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = true;
break;
}
Expand All @@ -751,7 +763,8 @@ HANDLER_START {
const auto &target{sourcemeta::jsontoolkit::get(
instance, logical.relative_instance_location)};
for (const auto &child : logical.children) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = true;
break;
}
Expand All @@ -778,7 +791,7 @@ HANDLER_START {
const auto &new_instance{target.at(entry.first)};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance, property_target,
context)) {
depth + 1, context)) {
result = false;
context.instance_location.pop_back();
EVALUATE_END(loop, LoopPropertiesUnevaluated);
Expand Down Expand Up @@ -834,7 +847,7 @@ HANDLER_START {
const auto &new_instance{target.at(entry.first)};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance, property_target,
context)) {
depth + 1, context)) {
result = false;
context.instance_location.pop_back();
EVALUATE_END(loop, LoopPropertiesUnevaluatedExcept);
Expand Down Expand Up @@ -863,7 +876,8 @@ HANDLER_START {
const auto &substep{loop.children[index->second]};
assert(std::holds_alternative<ControlGroup>(substep));
for (const auto &child : std::get<ControlGroup>(substep).children) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = false;
EVALUATE_END(loop, LoopPropertiesMatch);
}
Expand All @@ -887,7 +901,8 @@ HANDLER_START {
const auto &substep{loop.children[index->second]};
assert(std::holds_alternative<ControlGroup>(substep));
for (const auto &child : std::get<ControlGroup>(substep).children) {
if (!evaluate_step(child, callback, target, property_target, context)) {
if (!evaluate_step(child, callback, target, property_target, depth + 1,
context)) {
result = false;
EVALUATE_END(loop, LoopPropertiesMatchClosed);
}
Expand All @@ -908,7 +923,7 @@ HANDLER_START {
const auto &new_instance{target.at(entry.first)};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance, property_target,
context)) {
depth + 1, context)) {
result = false;
if (track) {
context.instance_location.pop_back();
Expand Down Expand Up @@ -936,7 +951,7 @@ HANDLER_START {
const auto &new_instance{target.at(entry.first)};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance, property_target,
context)) {
depth + 1, context)) {
result = false;
if (track) {
context.instance_location.pop_back();
Expand Down Expand Up @@ -971,7 +986,7 @@ HANDLER_START {
const auto &new_instance{target.at(entry.first)};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance, property_target,
context)) {
depth + 1, context)) {
result = false;
if (track) {
context.instance_location.pop_back();
Expand Down Expand Up @@ -1007,7 +1022,7 @@ HANDLER_START {
const auto &new_instance{target.at(entry.first)};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance, property_target,
context)) {
depth + 1, context)) {
result = false;
if (track) {
context.instance_location.pop_back();
Expand Down Expand Up @@ -1039,7 +1054,7 @@ HANDLER_START {
const auto &new_instance{target.at(entry.first)};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance, property_target,
context)) {
depth + 1, context)) {
result = false;
if (track) {
context.instance_location.pop_back();
Expand Down Expand Up @@ -1093,7 +1108,7 @@ HANDLER_START {
const auto &new_instance{target.at(entry.first)};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance, property_target,
context)) {
depth + 1, context)) {
result = false;
if (track) {
context.instance_location.pop_back();
Expand Down Expand Up @@ -1240,7 +1255,7 @@ HANDLER_START {
const auto &new_instance{target.at(entry.first)};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance,
std::cref(entry.first), context)) {
std::cref(entry.first), depth + 1, context)) {
result = false;
if (track) {
context.instance_location.pop_back();
Expand Down Expand Up @@ -1269,7 +1284,7 @@ HANDLER_START {
const auto &new_instance{target.at(index)};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance, property_target,
context)) {
depth + 1, context)) {
result = false;
if (track) {
context.instance_location.pop_back();
Expand Down Expand Up @@ -1301,7 +1316,7 @@ HANDLER_START {
const auto &new_instance{target.at(index)};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance, property_target,
context)) {
depth + 1, context)) {
result = false;
context.instance_location.pop_back();
EVALUATE_END(loop, LoopItemsUnevaluated);
Expand Down Expand Up @@ -1381,7 +1396,7 @@ HANDLER_START {
bool subresult{true};
for (const auto &child : loop.children) {
if (!evaluate_step(child, callback, new_instance, property_target,
context)) {
depth + 1, context)) {
subresult = false;
break;
}
Expand Down
Loading

5 comments on commit 21b2224

@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: 21b2224 Previous: 6ba7628 Ratio
Compiler_Draft6_AdaptiveCard 32590336957.999966 ns/iter 32874253374.999966 ns/iter 0.99
Compiler_2019_09_OMC_JSON_V2 6740815083.00003 ns/iter 7445065750.000026 ns/iter 0.91
Evaluator_Draft4_Meta_1_No_Callback 273.24636906673425 ns/iter 316.1394086427567 ns/iter 0.86
Evaluator_Draft4_Required_Properties 388.34383967437816 ns/iter 450.6620471897142 ns/iter 0.86
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 23.72339953986068 ns/iter 29.346204515617565 ns/iter 0.81
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 14.51875797614672 ns/iter 16.286284268984875 ns/iter 0.89
Evaluator_Draft4_Items_Schema 768.622836181901 ns/iter 846.5621298025235 ns/iter 0.91
Evaluator_Draft4_Nested_Object 4.098897768283928 ns/iter 4.398489997672311 ns/iter 0.93
Evaluator_Draft4_Properties_Triad_Optional 1002.0209548721255 ns/iter 1104.7126506431478 ns/iter 0.91
Evaluator_Draft4_Properties_Triad_Closed 716.6688446160916 ns/iter 792.4494203241684 ns/iter 0.90
Evaluator_Draft4_Properties_Triad_Required 1063.197289442821 ns/iter 1091.4448500181416 ns/iter 0.97
Evaluator_Draft4_Properties_Closed 96.69520856846464 ns/iter 121.82840435849756 ns/iter 0.79
Evaluator_Draft4_Non_Recursive_Ref 14.113816568825335 ns/iter 16.29041964869751 ns/iter 0.87
Evaluator_Draft4_Pattern_Properties_True 1209.3663686491263 ns/iter 1227.6176474215551 ns/iter 0.99
Evaluator_Draft4_Ref_To_Single_Property 15.395195672430578 ns/iter 17.926868357641332 ns/iter 0.86
Evaluator_Draft4_Additional_Properties_Type 25.352783392641378 ns/iter 27.402445994060905 ns/iter 0.93
Evaluator_Draft4_Nested_Oneof 95.96090495149755 ns/iter 105.15139021138607 ns/iter 0.91
Evaluator_Draft4_Long_Enum 22.901136555624838 ns/iter 24.683145991176023 ns/iter 0.93
Evaluator_Draft4_Type_Object 8.824303744490177 ns/iter 10.400092870201158 ns/iter 0.85
Evaluator_Draft6_Property_Names 295.50720621371573 ns/iter 331.0307148358441 ns/iter 0.89
Evaluator_Draft7_If_Then_Else 39.131689921418676 ns/iter 44.84361965934845 ns/iter 0.87
Evaluator_Draft7_Vercel_1 93880.55746972948 ns/iter 98866.23491837735 ns/iter 0.95
Evaluator_2019_09_Unevaluated_Properties 219.4557319801684 ns/iter 234.43542275415837 ns/iter 0.94
Evaluator_2019_09_OMC_JSON_V2_1 7026.746161422286 ns/iter 6773.275414380326 ns/iter 1.04
Evaluator_2020_12_Dynamic_Ref 706.8834894205391 ns/iter 712.5673270192636 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 (linux/llvm)

Benchmark suite Current: 21b2224 Previous: 6ba7628 Ratio
Compiler_Draft6_AdaptiveCard 57958090809 ns/iter 57933851975.99997 ns/iter 1.00
Compiler_2019_09_OMC_JSON_V2 11006546474.999992 ns/iter 10993956199.000025 ns/iter 1.00
Evaluator_Draft4_Meta_1_No_Callback 493.6494071404948 ns/iter 478.72336305802963 ns/iter 1.03
Evaluator_Draft4_Required_Properties 926.1311993593779 ns/iter 957.7069340217801 ns/iter 0.97
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 60.9610902964276 ns/iter 58.33495333838399 ns/iter 1.05
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 41.00600987052514 ns/iter 39.28950076407092 ns/iter 1.04
Evaluator_Draft4_Items_Schema 1477.6858597084374 ns/iter 1501.3066449057028 ns/iter 0.98
Evaluator_Draft4_Nested_Object 11.454680986890377 ns/iter 12.09205275682082 ns/iter 0.95
Evaluator_Draft4_Properties_Triad_Optional 1338.8863629462687 ns/iter 1309.1830674469916 ns/iter 1.02
Evaluator_Draft4_Properties_Triad_Closed 1045.516045766335 ns/iter 1024.0597257346692 ns/iter 1.02
Evaluator_Draft4_Properties_Triad_Required 1354.4871277598818 ns/iter 1357.2495267278734 ns/iter 1.00
Evaluator_Draft4_Properties_Closed 171.75995077898978 ns/iter 172.84447143631616 ns/iter 0.99
Evaluator_Draft4_Non_Recursive_Ref 44.035435291415304 ns/iter 47.3755330993062 ns/iter 0.93
Evaluator_Draft4_Pattern_Properties_True 2051.0804311750203 ns/iter 1977.3750106161124 ns/iter 1.04
Evaluator_Draft4_Ref_To_Single_Property 40.715344225918 ns/iter 39.725934085974785 ns/iter 1.02
Evaluator_Draft4_Additional_Properties_Type 68.40516750257399 ns/iter 76.47396712204572 ns/iter 0.89
Evaluator_Draft4_Nested_Oneof 183.68672921175892 ns/iter 191.61618376326635 ns/iter 0.96
Evaluator_Draft4_Long_Enum 34.39521940019013 ns/iter 34.7875848922764 ns/iter 0.99
Evaluator_Draft4_Type_Object 23.52585059030548 ns/iter 24.13156642440499 ns/iter 0.97
Evaluator_Draft6_Property_Names 615.3206741932518 ns/iter 649.8082558529774 ns/iter 0.95
Evaluator_Draft7_If_Then_Else 89.81998916901792 ns/iter 89.44994357483324 ns/iter 1.00
Evaluator_Draft7_Vercel_1 146234.76081730667 ns/iter 141986.1800239179 ns/iter 1.03
Evaluator_2019_09_Unevaluated_Properties 280.7449769248063 ns/iter 279.5282933130534 ns/iter 1.00
Evaluator_2019_09_OMC_JSON_V2_1 10460.225429949061 ns/iter 10436.90279111681 ns/iter 1.00
Evaluator_2020_12_Dynamic_Ref 1081.156225691408 ns/iter 1131.8964518490318 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: 21b2224 Previous: 6ba7628 Ratio
Evaluator_2020_12_Dynamic_Ref 1193.1475187200938 ns/iter 1077.5724619727575 ns/iter 1.11
Evaluator_2019_09_Unevaluated_Properties 332.39443631910194 ns/iter 337.7914690348356 ns/iter 0.98
Evaluator_2019_09_OMC_JSON_V2_1 12759.713958222466 ns/iter 12824.18571905082 ns/iter 0.99
Evaluator_Draft7_If_Then_Else 71.53247253234242 ns/iter 79.80617312882747 ns/iter 0.90
Evaluator_Draft7_Vercel_1 157972.8022363363 ns/iter 149051.41849662238 ns/iter 1.06
Evaluator_Draft6_Property_Names 1270.185939113111 ns/iter 1256.1841736682943 ns/iter 1.01
Evaluator_Draft4_Meta_1_No_Callback 544.0663528275943 ns/iter 544.99518359693 ns/iter 1.00
Evaluator_Draft4_Required_Properties 1847.482005178865 ns/iter 1864.9251306247927 ns/iter 0.99
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 52.45259748969614 ns/iter 52.71227745717979 ns/iter 1.00
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 42.62628027119503 ns/iter 41.54889875985314 ns/iter 1.03
Evaluator_Draft4_Items_Schema 1356.5130801091213 ns/iter 1336.364236164436 ns/iter 1.02
Evaluator_Draft4_Nested_Object 6.1519300824997645 ns/iter 8.177937381646633 ns/iter 0.75
Evaluator_Draft4_Properties_Triad_Optional 1394.2382564236716 ns/iter 1361.7414123384053 ns/iter 1.02
Evaluator_Draft4_Properties_Triad_Closed 1085.1143568928544 ns/iter 1066.9785102862131 ns/iter 1.02
Evaluator_Draft4_Properties_Triad_Required 1478.9673535447062 ns/iter 1434.7913154158143 ns/iter 1.03
Evaluator_Draft4_Properties_Closed 209.729451261147 ns/iter 212.71472332369993 ns/iter 0.99
Evaluator_Draft4_Non_Recursive_Ref 59.05557830685274 ns/iter 59.011878098750415 ns/iter 1.00
Evaluator_Draft4_Pattern_Properties_True 2184.536030459414 ns/iter 2095.041575388007 ns/iter 1.04
Evaluator_Draft4_Ref_To_Single_Property 46.9175860905861 ns/iter 45.97740634419776 ns/iter 1.02
Evaluator_Draft4_Additional_Properties_Type 113.55411429381843 ns/iter 113.62693423086438 ns/iter 1.00
Evaluator_Draft4_Nested_Oneof 159.5521726202027 ns/iter 156.7140709518004 ns/iter 1.02
Evaluator_Draft4_Long_Enum 26.121699584936447 ns/iter 26.990644426976097 ns/iter 0.97
Evaluator_Draft4_Type_Object 16.828014674298533 ns/iter 18.68449182122194 ns/iter 0.90
Compiler_2019_09_OMC_JSON_V2 11374399208 ns/iter 11400943141.000084 ns/iter 1.00
Compiler_Draft6_AdaptiveCard 65521135512.99999 ns/iter 66186420902.00001 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/gcc)

Benchmark suite Current: 21b2224 Previous: 6ba7628 Ratio
Compiler_Draft6_AdaptiveCard 42783633232.1167 ns/iter 45999326944.3512 ns/iter 0.93
Compiler_2019_09_OMC_JSON_V2 7778801202.774048 ns/iter 8437051057.815552 ns/iter 0.92
Evaluator_Draft4_Meta_1_No_Callback 288.8627749941998 ns/iter 310.39710450552474 ns/iter 0.93
Evaluator_Draft4_Required_Properties 482.25268834178627 ns/iter 529.1378941506025 ns/iter 0.91
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 28.582711816967123 ns/iter 32.575315646709804 ns/iter 0.88
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 17.558398510419373 ns/iter 19.420506930437327 ns/iter 0.90
Evaluator_Draft4_Items_Schema 851.801819619314 ns/iter 932.7842495410666 ns/iter 0.91
Evaluator_Draft4_Nested_Object 4.175038538560154 ns/iter 4.1703415731794795 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Optional 1031.5714150750596 ns/iter 1114.4984831819413 ns/iter 0.93
Evaluator_Draft4_Properties_Triad_Closed 829.9953345765814 ns/iter 891.3909887756215 ns/iter 0.93
Evaluator_Draft4_Properties_Triad_Required 1040.7463490115645 ns/iter 1105.2265452650315 ns/iter 0.94
Evaluator_Draft4_Properties_Closed 113.08800131936533 ns/iter 124.20954752349449 ns/iter 0.91
Evaluator_Draft4_Non_Recursive_Ref 22.9558328174598 ns/iter 25.530977471349644 ns/iter 0.90
Evaluator_Draft4_Pattern_Properties_True 1613.99143391026 ns/iter 1699.562062296388 ns/iter 0.95
Evaluator_Draft4_Ref_To_Single_Property 16.961505737148357 ns/iter 18.565421623550186 ns/iter 0.91
Evaluator_Draft4_Additional_Properties_Type 38.774278949809556 ns/iter 40.92814758197576 ns/iter 0.95
Evaluator_Draft4_Nested_Oneof 101.88961112811432 ns/iter 112.84177435943627 ns/iter 0.90
Evaluator_Draft4_Long_Enum 15.70948712896602 ns/iter 17.695104771587694 ns/iter 0.89
Evaluator_Draft4_Type_Object 10.661000922757953 ns/iter 12.404142579231737 ns/iter 0.86
Evaluator_Draft6_Property_Names 403.6263133756744 ns/iter 443.48401770068085 ns/iter 0.91
Evaluator_Draft7_If_Then_Else 43.535559921703744 ns/iter 50.136399269104004 ns/iter 0.87
Evaluator_Draft7_Vercel_1 95296.8828464278 ns/iter 103391.80970252064 ns/iter 0.92
Evaluator_2019_09_Unevaluated_Properties 236.44210877334768 ns/iter 253.68247344459735 ns/iter 0.93
Evaluator_2019_09_OMC_JSON_V2_1 6205.393647892979 ns/iter 6842.760967584698 ns/iter 0.91
Evaluator_2020_12_Dynamic_Ref 777.0121371059288 ns/iter 857.3820668328074 ns/iter 0.91

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: 21b2224 Previous: 6ba7628 Ratio
Compiler_Draft6_AdaptiveCard 120560053599.99994 ns/iter 120826007699.99998 ns/iter 1.00
Compiler_2019_09_OMC_JSON_V2 25691453400 ns/iter 25532280399.999992 ns/iter 1.01
Evaluator_Draft4_Meta_1_No_Callback 869.1251923548069 ns/iter 899.0429468558253 ns/iter 0.97
Evaluator_Draft4_Required_Properties 1341.8369642855462 ns/iter 1346.0219214189892 ns/iter 1.00
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 138.4481790871152 ns/iter 146.90506696426147 ns/iter 0.94
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 92.8229288918248 ns/iter 96.79843764290874 ns/iter 0.96
Evaluator_Draft4_Items_Schema 2677.4912817945474 ns/iter 2721.4215975792386 ns/iter 0.98
Evaluator_Draft4_Nested_Object 55.46691071428102 ns/iter 54.442383928566024 ns/iter 1.02
Evaluator_Draft4_Properties_Triad_Optional 4835.92681779111 ns/iter 4816.434166458041 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Closed 3882.2310267860867 ns/iter 3878.147321428723 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Required 4827.4800022137615 ns/iter 4783.09322151148 ns/iter 1.01
Evaluator_Draft4_Properties_Closed 345.2700990588468 ns/iter 360.85856744905055 ns/iter 0.96
Evaluator_Draft4_Non_Recursive_Ref 152.17508928567926 ns/iter 150.13650669034217 ns/iter 1.01
Evaluator_Draft4_Pattern_Properties_True 7748.46540178485 ns/iter 7767.006696427968 ns/iter 1.00
Evaluator_Draft4_Ref_To_Single_Property 94.16924579601094 ns/iter 101.06735937501553 ns/iter 0.93
Evaluator_Draft4_Additional_Properties_Type 236.46204950199458 ns/iter 235.2376411565392 ns/iter 1.01
Evaluator_Draft4_Nested_Oneof 369.9740232189761 ns/iter 379.6849679133975 ns/iter 0.97
Evaluator_Draft4_Long_Enum 113.91134374999723 ns/iter 122.84446428570358 ns/iter 0.93
Evaluator_Draft4_Type_Object 77.16737723215365 ns/iter 87.48571484438837 ns/iter 0.88
Evaluator_Draft6_Property_Names 1124.7812500000366 ns/iter 1157.56906250013 ns/iter 0.97
Evaluator_Draft7_If_Then_Else 180.73871256594364 ns/iter 187.57951674815314 ns/iter 0.96
Evaluator_Draft7_Vercel_1 233703.54871110822 ns/iter 244447.40542355165 ns/iter 0.96
Evaluator_2019_09_Unevaluated_Properties 706.1924107143775 ns/iter 710.754196428606 ns/iter 0.99
Evaluator_2019_09_OMC_JSON_V2_1 15499.136160716125 ns/iter 15533.627232139834 ns/iter 1.00
Evaluator_2020_12_Dynamic_Ref 2197.7537499999753 ns/iter 2205.183125000332 ns/iter 1.00

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

Please sign in to comment.