Skip to content

Commit

Permalink
Unroll closed properties if all are required (#224)
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 22, 2024
1 parent 3eeef65 commit 6b684b3
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/compiler/default_compiler_draft4.h
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,9 @@ auto properties_as_loop(const Context &context,
if (!inside_disjunctor &&
schema_context.schema.defines("additionalProperties") &&
schema_context.schema.at("additionalProperties").is_boolean() &&
!schema_context.schema.at("additionalProperties").to_boolean()) {
!schema_context.schema.at("additionalProperties").to_boolean() &&
// If all properties are required, we should still unroll
required.size() < size) {
return true;
}

Expand Down Expand Up @@ -973,6 +975,9 @@ auto compiler_draft4_applicator_additionalproperties_with_options(
if (properties_as_loop(context, schema_context,
schema_context.schema.at("properties"))) {
return {};
} else if (!children.empty() &&
std::holds_alternative<AssertionFail>(children.front())) {
return {};
} else {
return {make<LoopPropertiesWhitelist>(
context, schema_context, dynamic_context, std::move(filter_strings))};
Expand Down
41 changes: 41 additions & 0 deletions test/evaluator/evaluator_draft4_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2766,6 +2766,47 @@ TEST(Evaluator_draft4, additionalProperties_11) {
"The object value was not expected to define additional properties");
}

TEST(Evaluator_draft4, additionalProperties_12) {
const sourcemeta::jsontoolkit::JSON schema{
sourcemeta::jsontoolkit::parse(R"JSON({
"$schema": "http://json-schema.org/draft-04/schema#",
"required": [ "foo", "bar" ],
"additionalProperties": false,
"properties": {
"foo": { "type": "boolean" },
"bar": { "type": "boolean" }
}
})JSON")};

const sourcemeta::jsontoolkit::JSON instance{
sourcemeta::jsontoolkit::parse("{ \"foo\": true, \"bar\": false }")};

EVALUATE_WITH_TRACE_FAST_SUCCESS(schema, instance, 3);

EVALUATE_TRACE_PRE(0, AssertionDefinesAll, "/required", "#/required", "");
EVALUATE_TRACE_PRE(1, AssertionPropertyTypeStrict, "/properties/bar/type",
"#/properties/bar/type", "/bar");
EVALUATE_TRACE_PRE(2, AssertionPropertyTypeStrict, "/properties/foo/type",
"#/properties/foo/type", "/foo");

EVALUATE_TRACE_POST_SUCCESS(0, AssertionDefinesAll, "/required", "#/required",
"");
EVALUATE_TRACE_POST_SUCCESS(1, AssertionPropertyTypeStrict,
"/properties/bar/type", "#/properties/bar/type",
"/bar");
EVALUATE_TRACE_POST_SUCCESS(2, AssertionPropertyTypeStrict,
"/properties/foo/type", "#/properties/foo/type",
"/foo");

EVALUATE_TRACE_POST_DESCRIBE(instance, 0,
"The object value was expected to define "
"properties \"foo\", and \"bar\"");
EVALUATE_TRACE_POST_DESCRIBE(instance, 1,
"The value was expected to be of type boolean");
EVALUATE_TRACE_POST_DESCRIBE(instance, 2,
"The value was expected to be of type boolean");
}

TEST(Evaluator_draft4, not_1) {
const sourcemeta::jsontoolkit::JSON schema{
sourcemeta::jsontoolkit::parse(R"JSON({
Expand Down

10 comments on commit 6b684b3

@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: 6b684b3 Previous: 3eeef65 Ratio
Compiler_Draft6_AdaptiveCard 32126915833 ns/iter 31874124292.000034 ns/iter 1.01
Compiler_2019_09_OMC_JSON_V2 6648961125.000028 ns/iter 6789712124.999937 ns/iter 0.98
Evaluator_Draft4_Meta_1_No_Callback 251.75964234232634 ns/iter 240.67538788077184 ns/iter 1.05
Evaluator_Draft4_Required_Properties 328.52765666052807 ns/iter 322.6430711463331 ns/iter 1.02
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 18.33484310322912 ns/iter 18.469003006664234 ns/iter 0.99
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 10.132991547748636 ns/iter 10.042394931505848 ns/iter 1.01
Evaluator_Draft4_Items_Schema 325.29728871625775 ns/iter 326.80589438243817 ns/iter 1.00
Evaluator_Draft4_Nested_Object 3.1429058707076933 ns/iter 2.8294223646777144 ns/iter 1.11
Evaluator_Draft4_Properties_Triad_Optional 1004.1646592143597 ns/iter 974.6663700353433 ns/iter 1.03
Evaluator_Draft4_Properties_Triad_Closed 679.3006722281953 ns/iter 678.0235538641392 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Required 965.5152798986343 ns/iter 981.3075306426197 ns/iter 0.98
Evaluator_Draft4_Properties_Closed 77.18929074382015 ns/iter 76.9559782084803 ns/iter 1.00
Evaluator_Draft4_Non_Recursive_Ref 10.37247167069588 ns/iter 10.422674409946948 ns/iter 1.00
Evaluator_Draft4_Pattern_Properties_True 1104.2131259475798 ns/iter 1109.2942180239481 ns/iter 1.00
Evaluator_Draft4_Ref_To_Single_Property 11.102792693542945 ns/iter 10.954989049633275 ns/iter 1.01
Evaluator_Draft4_Additional_Properties_Type 20.590311977920965 ns/iter 20.60911931215267 ns/iter 1.00
Evaluator_Draft4_Nested_Oneof 67.26708760887405 ns/iter 68.32638617254734 ns/iter 0.98
Evaluator_Draft4_Long_Enum 28.258848038271374 ns/iter 28.279334934624032 ns/iter 1.00
Evaluator_Draft4_Type_Object 5.968841206411248 ns/iter 5.980561829646608 ns/iter 1.00
Evaluator_Draft6_Property_Names 135.56185013280185 ns/iter 135.69243534414653 ns/iter 1.00
Evaluator_Draft7_If_Then_Else 27.15010125345922 ns/iter 27.187343802191766 ns/iter 1.00
Evaluator_Draft7_Vercel_1 74307.542767305 ns/iter 74466.87383178029 ns/iter 1.00
Evaluator_2019_09_Unevaluated_Properties 148.89036634509827 ns/iter 147.8193962116796 ns/iter 1.01
Evaluator_2019_09_OMC_JSON_V2_1 2540.743529246411 ns/iter 5589.205286012577 ns/iter 0.45
Evaluator_2020_12_Dynamic_Ref 525.5974093076783 ns/iter 506.9868922902465 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: 6b684b3 Previous: 3eeef65 Ratio
Compiler_Draft6_AdaptiveCard 57353636747.999985 ns/iter 57516607716.00001 ns/iter 1.00
Compiler_2019_09_OMC_JSON_V2 10705398110.000032 ns/iter 10901995047.000013 ns/iter 0.98
Evaluator_Draft4_Meta_1_No_Callback 354.03323908307624 ns/iter 354.6707485436806 ns/iter 1.00
Evaluator_Draft4_Required_Properties 754.6181622705942 ns/iter 758.2754116475223 ns/iter 1.00
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 37.89470686794156 ns/iter 38.368151842763325 ns/iter 0.99
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 22.89396615311074 ns/iter 28.93478055157322 ns/iter 0.79
Evaluator_Draft4_Items_Schema 684.7616192439331 ns/iter 741.4473766513528 ns/iter 0.92
Evaluator_Draft4_Nested_Object 4.930401994537503 ns/iter 4.947135110054293 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Optional 1228.6806041602097 ns/iter 1216.003273859749 ns/iter 1.01
Evaluator_Draft4_Properties_Triad_Closed 958.3769578194274 ns/iter 959.410563096602 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Required 1262.5942982653987 ns/iter 1250.2458391644361 ns/iter 1.01
Evaluator_Draft4_Properties_Closed 133.31689925597593 ns/iter 134.7607932961729 ns/iter 0.99
Evaluator_Draft4_Non_Recursive_Ref 28.7621713142304 ns/iter 32.79249649001421 ns/iter 0.88
Evaluator_Draft4_Pattern_Properties_True 1838.8553038174302 ns/iter 1801.5205504862117 ns/iter 1.02
Evaluator_Draft4_Ref_To_Single_Property 24.135172925734768 ns/iter 24.450729647474265 ns/iter 0.99
Evaluator_Draft4_Additional_Properties_Type 52.608645533491554 ns/iter 61.21578467676042 ns/iter 0.86
Evaluator_Draft4_Nested_Oneof 124.06787739242884 ns/iter 130.2028779584118 ns/iter 0.95
Evaluator_Draft4_Long_Enum 21.429350324662117 ns/iter 22.923867595590792 ns/iter 0.93
Evaluator_Draft4_Type_Object 10.829738166115627 ns/iter 11.751479982770665 ns/iter 0.92
Evaluator_Draft6_Property_Names 240.82143151121804 ns/iter 240.961755950469 ns/iter 1.00
Evaluator_Draft7_If_Then_Else 54.46002443457623 ns/iter 57.183151281108216 ns/iter 0.95
Evaluator_Draft7_Vercel_1 100748.34644651349 ns/iter 99627.67255075587 ns/iter 1.01
Evaluator_2019_09_Unevaluated_Properties 188.36512377628827 ns/iter 195.38553665580866 ns/iter 0.96
Evaluator_2019_09_OMC_JSON_V2_1 3433.832984420674 ns/iter 8388.386757947861 ns/iter 0.41
Evaluator_2020_12_Dynamic_Ref 816.4479892566553 ns/iter 847.9033975855143 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 (macos/gcc)

Benchmark suite Current: 6b684b3 Previous: 3eeef65 Ratio
Compiler_Draft6_AdaptiveCard 47980980157.85217 ns/iter 48225228071.21277 ns/iter 0.99
Compiler_2019_09_OMC_JSON_V2 8206960916.519165 ns/iter 8475935935.974121 ns/iter 0.97
Evaluator_Draft4_Meta_1_No_Callback 258.05445646963705 ns/iter 258.5089810466701 ns/iter 1.00
Evaluator_Draft4_Required_Properties 454.9918282051219 ns/iter 470.0927981304834 ns/iter 0.97
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 23.827667586074327 ns/iter 23.807240370937404 ns/iter 1.00
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 14.013324857678954 ns/iter 15.33781577190528 ns/iter 0.91
Evaluator_Draft4_Items_Schema 489.6608139650065 ns/iter 510.745111683398 ns/iter 0.96
Evaluator_Draft4_Nested_Object 2.0049529673183075 ns/iter 2.051151446083575 ns/iter 0.98
Evaluator_Draft4_Properties_Triad_Optional 1127.5075921884957 ns/iter 1086.961450217297 ns/iter 1.04
Evaluator_Draft4_Properties_Triad_Closed 879.8765681782307 ns/iter 847.566976850782 ns/iter 1.04
Evaluator_Draft4_Properties_Triad_Required 1050.7284151476942 ns/iter 1086.6781147981376 ns/iter 0.97
Evaluator_Draft4_Properties_Closed 98.52994173200416 ns/iter 99.94367764734788 ns/iter 0.99
Evaluator_Draft4_Non_Recursive_Ref 19.429215676076154 ns/iter 19.587089478353874 ns/iter 0.99
Evaluator_Draft4_Pattern_Properties_True 1529.6642648602558 ns/iter 1511.7353634933986 ns/iter 1.01
Evaluator_Draft4_Ref_To_Single_Property 13.364964729045697 ns/iter 13.493455168540487 ns/iter 0.99
Evaluator_Draft4_Additional_Properties_Type 38.99241081592591 ns/iter 38.98827841954643 ns/iter 1.00
Evaluator_Draft4_Nested_Oneof 79.95811380849109 ns/iter 84.15848715998654 ns/iter 0.95
Evaluator_Draft4_Long_Enum 11.439670392654957 ns/iter 14.26440627175276 ns/iter 0.80
Evaluator_Draft4_Type_Object 6.546633447336215 ns/iter 7.266584373036777 ns/iter 0.90
Evaluator_Draft6_Property_Names 174.0557583827334 ns/iter 171.95618297503276 ns/iter 1.01
Evaluator_Draft7_If_Then_Else 33.319282150917815 ns/iter 36.062698503890196 ns/iter 0.92
Evaluator_Draft7_Vercel_1 85266.69079547949 ns/iter 87548.68161981103 ns/iter 0.97
Evaluator_2019_09_Unevaluated_Properties 158.38628056611262 ns/iter 161.7989283920888 ns/iter 0.98
Evaluator_2019_09_OMC_JSON_V2_1 2600.8024018771716 ns/iter 5913.522616104509 ns/iter 0.44
Evaluator_2020_12_Dynamic_Ref 589.3566735878733 ns/iter 640.119765063511 ns/iter 0.92

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: 6b684b3 Previous: 3eeef65 Ratio
Evaluator_2020_12_Dynamic_Ref 887.0580045116461 ns/iter 872.041039818662 ns/iter 1.02
Evaluator_2019_09_Unevaluated_Properties 242.48985616928775 ns/iter 234.98685549234457 ns/iter 1.03
Evaluator_2019_09_OMC_JSON_V2_1 5074.339457672901 ns/iter 10682.932232934589 ns/iter 0.47
Evaluator_Draft7_If_Then_Else 51.421435346381166 ns/iter 50.18435089122693 ns/iter 1.02
Evaluator_Draft7_Vercel_1 117885.11873620487 ns/iter 113198.54913984743 ns/iter 1.04
Evaluator_Draft6_Property_Names 502.6928041396261 ns/iter 495.1292504023362 ns/iter 1.02
Evaluator_Draft4_Meta_1_No_Callback 438.3747760324737 ns/iter 419.1951811835132 ns/iter 1.05
Evaluator_Draft4_Required_Properties 1726.7866028827873 ns/iter 1680.425593923251 ns/iter 1.03
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 39.38253750335355 ns/iter 38.49729770983766 ns/iter 1.02
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 33.28855209832798 ns/iter 31.98466808770216 ns/iter 1.04
Evaluator_Draft4_Items_Schema 578.2234451647168 ns/iter 547.2613405201914 ns/iter 1.06
Evaluator_Draft4_Nested_Object 3.519903369018444 ns/iter 3.5238304175021793 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Optional 1316.490415977516 ns/iter 1299.2300428594576 ns/iter 1.01
Evaluator_Draft4_Properties_Triad_Closed 1043.282276202952 ns/iter 1047.1988223412245 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Required 1349.128067494889 ns/iter 1360.3069634267667 ns/iter 0.99
Evaluator_Draft4_Properties_Closed 187.8078830001629 ns/iter 177.0720692894164 ns/iter 1.06
Evaluator_Draft4_Non_Recursive_Ref 49.1254588349508 ns/iter 52.562244557443165 ns/iter 0.93
Evaluator_Draft4_Pattern_Properties_True 1730.984242523592 ns/iter 1746.499704985518 ns/iter 0.99
Evaluator_Draft4_Ref_To_Single_Property 36.9052552517614 ns/iter 36.21854799447541 ns/iter 1.02
Evaluator_Draft4_Additional_Properties_Type 103.56751352395122 ns/iter 111.85102029818032 ns/iter 0.93
Evaluator_Draft4_Nested_Oneof 112.218916727114 ns/iter 107.73390082160326 ns/iter 1.04
Evaluator_Draft4_Long_Enum 19.6124063045278 ns/iter 19.60577161050829 ns/iter 1.00
Evaluator_Draft4_Type_Object 10.2805295556218 ns/iter 9.990235694837395 ns/iter 1.03
Compiler_2019_09_OMC_JSON_V2 11240586106.000023 ns/iter 11526075736.000053 ns/iter 0.98
Compiler_Draft6_AdaptiveCard 65529742396.00008 ns/iter 66154228071.00003 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: 6b684b3 Previous: 3eeef65 Ratio
Compiler_Draft6_AdaptiveCard 119026562500.00018 ns/iter 120345777099.99997 ns/iter 0.99
Compiler_2019_09_OMC_JSON_V2 25131944900.000008 ns/iter 25637872600.00004 ns/iter 0.98
Evaluator_Draft4_Meta_1_No_Callback 449.13750915963965 ns/iter 458.0976652416597 ns/iter 0.98
Evaluator_Draft4_Required_Properties 727.3506696428963 ns/iter 712.613392857188 ns/iter 1.02
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 35.93389060758474 ns/iter 35.22342163913058 ns/iter 1.02
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 21.766337499997235 ns/iter 21.195815625002723 ns/iter 1.03
Evaluator_Draft4_Items_Schema 676.1254464285977 ns/iter 597.6415178570805 ns/iter 1.13
Evaluator_Draft4_Nested_Object 3.763481243279506 ns/iter 4.066458547291675 ns/iter 0.93
Evaluator_Draft4_Properties_Triad_Optional 4292.263749999847 ns/iter 4251.171003941876 ns/iter 1.01
Evaluator_Draft4_Properties_Triad_Closed 3457.0743876325587 ns/iter 3418.6681136929997 ns/iter 1.01
Evaluator_Draft4_Properties_Triad_Required 4339.024999998742 ns/iter 4299.604999999929 ns/iter 1.01
Evaluator_Draft4_Properties_Closed 148.6088170263856 ns/iter 140.3350450743364 ns/iter 1.06
Evaluator_Draft4_Non_Recursive_Ref 15.331026785716519 ns/iter 15.847501268537812 ns/iter 0.97
Evaluator_Draft4_Pattern_Properties_True 6883.730357143592 ns/iter 6859.258035714584 ns/iter 1.00
Evaluator_Draft4_Ref_To_Single_Property 24.198361337066288 ns/iter 22.53760625000112 ns/iter 1.07
Evaluator_Draft4_Additional_Properties_Type 28.17523112421788 ns/iter 28.467665178568375 ns/iter 0.99
Evaluator_Draft4_Nested_Oneof 150.62320979359376 ns/iter 140.7851428571202 ns/iter 1.07
Evaluator_Draft4_Long_Enum 22.87870621787134 ns/iter 21.740299999997603 ns/iter 1.05
Evaluator_Draft4_Type_Object 9.612713796370784 ns/iter 9.915028080735913 ns/iter 0.97
Evaluator_Draft6_Property_Names 417.52011082501065 ns/iter 417.5703732811415 ns/iter 1.00
Evaluator_Draft7_If_Then_Else 53.173599999990984 ns/iter 50.67727000000559 ns/iter 1.05
Evaluator_Draft7_Vercel_1 111663.39062498309 ns/iter 111025.14062500291 ns/iter 1.01
Evaluator_2019_09_Unevaluated_Properties 423.25893750003735 ns/iter 427.4338725899814 ns/iter 0.99
Evaluator_2019_09_OMC_JSON_V2_1 4214.017921396286 ns/iter 9332.440033749856 ns/iter 0.45
Evaluator_2020_12_Dynamic_Ref 1323.983705356722 ns/iter 1334.2343373953854 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: 6b684b3 Previous: 3eeef65 Ratio
Compiler_Draft6_AdaptiveCard 35381240959.00002 ns/iter 31874124292.000034 ns/iter 1.11
Compiler_2019_09_OMC_JSON_V2 7198528749.999923 ns/iter 6789712124.999937 ns/iter 1.06
Evaluator_Draft4_Meta_1_No_Callback 246.75124630030646 ns/iter 240.67538788077184 ns/iter 1.03
Evaluator_Draft4_Required_Properties 344.1483570845308 ns/iter 322.6430711463331 ns/iter 1.07
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 19.42382963056453 ns/iter 18.469003006664234 ns/iter 1.05
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 10.960070987083578 ns/iter 10.042394931505848 ns/iter 1.09
Evaluator_Draft4_Items_Schema 352.78889374675384 ns/iter 326.80589438243817 ns/iter 1.08
Evaluator_Draft4_Nested_Object 3.1005003716316244 ns/iter 2.8294223646777144 ns/iter 1.10
Evaluator_Draft4_Properties_Triad_Optional 1002.6160991447772 ns/iter 974.6663700353433 ns/iter 1.03
Evaluator_Draft4_Properties_Triad_Closed 691.5742045767005 ns/iter 678.0235538641392 ns/iter 1.02
Evaluator_Draft4_Properties_Triad_Required 988.6785086636701 ns/iter 981.3075306426197 ns/iter 1.01
Evaluator_Draft4_Properties_Closed 78.73299536102398 ns/iter 76.9559782084803 ns/iter 1.02
Evaluator_Draft4_Non_Recursive_Ref 10.561079226336998 ns/iter 10.422674409946948 ns/iter 1.01
Evaluator_Draft4_Pattern_Properties_True 1136.380173398421 ns/iter 1109.2942180239481 ns/iter 1.02
Evaluator_Draft4_Ref_To_Single_Property 11.19132826917999 ns/iter 10.954989049633275 ns/iter 1.02
Evaluator_Draft4_Additional_Properties_Type 22.39897902344242 ns/iter 20.60911931215267 ns/iter 1.09
Evaluator_Draft4_Nested_Oneof 67.61276110250745 ns/iter 68.32638617254734 ns/iter 0.99
Evaluator_Draft4_Long_Enum 28.361593144528573 ns/iter 28.279334934624032 ns/iter 1.00
Evaluator_Draft4_Type_Object 6.011614225132212 ns/iter 5.980561829646608 ns/iter 1.01
Evaluator_Draft6_Property_Names 135.74220057178928 ns/iter 135.69243534414653 ns/iter 1.00
Evaluator_Draft7_If_Then_Else 27.527687689178443 ns/iter 27.187343802191766 ns/iter 1.01
Evaluator_Draft7_Vercel_1 75946.87962374916 ns/iter 74466.87383178029 ns/iter 1.02
Evaluator_2019_09_Unevaluated_Properties 150.42777006406675 ns/iter 147.8193962116796 ns/iter 1.02
Evaluator_2019_09_OMC_JSON_V2_1 2545.499373080304 ns/iter 5589.205286012577 ns/iter 0.46
Evaluator_2020_12_Dynamic_Ref 508.6388040241405 ns/iter 506.9868922902465 ns/iter 1.00

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: 6b684b3 Previous: 3eeef65 Ratio
Compiler_Draft6_AdaptiveCard 57393789611.99998 ns/iter 57516607716.00001 ns/iter 1.00
Compiler_2019_09_OMC_JSON_V2 10719743804.000017 ns/iter 10901995047.000013 ns/iter 0.98
Evaluator_Draft4_Meta_1_No_Callback 352.3160850525179 ns/iter 354.6707485436806 ns/iter 0.99
Evaluator_Draft4_Required_Properties 749.2461784151523 ns/iter 758.2754116475223 ns/iter 0.99
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 37.77729234440494 ns/iter 38.368151842763325 ns/iter 0.98
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 22.888513841559767 ns/iter 28.93478055157322 ns/iter 0.79
Evaluator_Draft4_Items_Schema 690.1144045458353 ns/iter 741.4473766513528 ns/iter 0.93
Evaluator_Draft4_Nested_Object 4.940532509553367 ns/iter 4.947135110054293 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Optional 1232.2827198896218 ns/iter 1216.003273859749 ns/iter 1.01
Evaluator_Draft4_Properties_Triad_Closed 961.2648669748231 ns/iter 959.410563096602 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Required 1262.4773525388164 ns/iter 1250.2458391644361 ns/iter 1.01
Evaluator_Draft4_Properties_Closed 133.28387337001357 ns/iter 134.7607932961729 ns/iter 0.99
Evaluator_Draft4_Non_Recursive_Ref 28.82012037194244 ns/iter 32.79249649001421 ns/iter 0.88
Evaluator_Draft4_Pattern_Properties_True 1865.7023407891738 ns/iter 1801.5205504862117 ns/iter 1.04
Evaluator_Draft4_Ref_To_Single_Property 24.029693444246597 ns/iter 24.450729647474265 ns/iter 0.98
Evaluator_Draft4_Additional_Properties_Type 52.58139479809776 ns/iter 61.21578467676042 ns/iter 0.86
Evaluator_Draft4_Nested_Oneof 121.8676117951128 ns/iter 130.2028779584118 ns/iter 0.94
Evaluator_Draft4_Long_Enum 21.35618289959004 ns/iter 22.923867595590792 ns/iter 0.93
Evaluator_Draft4_Type_Object 10.852164123494276 ns/iter 11.751479982770665 ns/iter 0.92
Evaluator_Draft6_Property_Names 258.4597013839144 ns/iter 240.961755950469 ns/iter 1.07
Evaluator_Draft7_If_Then_Else 53.987014034949055 ns/iter 57.183151281108216 ns/iter 0.94
Evaluator_Draft7_Vercel_1 103180.8073580543 ns/iter 99627.67255075587 ns/iter 1.04
Evaluator_2019_09_Unevaluated_Properties 190.88110018454827 ns/iter 195.38553665580866 ns/iter 0.98
Evaluator_2019_09_OMC_JSON_V2_1 3428.9712775680096 ns/iter 8388.386757947861 ns/iter 0.41
Evaluator_2020_12_Dynamic_Ref 821.3687498607283 ns/iter 847.9033975855143 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 (macos/gcc)

Benchmark suite Current: 6b684b3 Previous: 3eeef65 Ratio
Compiler_Draft6_AdaptiveCard 46130548000.33569 ns/iter 48225228071.21277 ns/iter 0.96
Compiler_2019_09_OMC_JSON_V2 8284448146.820068 ns/iter 8475935935.974121 ns/iter 0.98
Evaluator_Draft4_Meta_1_No_Callback 257.4664446454487 ns/iter 258.5089810466701 ns/iter 1.00
Evaluator_Draft4_Required_Properties 456.0304805873986 ns/iter 470.0927981304834 ns/iter 0.97
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 23.73762384707476 ns/iter 23.807240370937404 ns/iter 1.00
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 14.446873000803954 ns/iter 15.33781577190528 ns/iter 0.94
Evaluator_Draft4_Items_Schema 482.6414133689619 ns/iter 510.745111683398 ns/iter 0.94
Evaluator_Draft4_Nested_Object 2.048100512600004 ns/iter 2.051151446083575 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Optional 1080.693832436273 ns/iter 1086.961450217297 ns/iter 0.99
Evaluator_Draft4_Properties_Triad_Closed 858.8724333914523 ns/iter 847.566976850782 ns/iter 1.01
Evaluator_Draft4_Properties_Triad_Required 1069.0418678914764 ns/iter 1086.6781147981376 ns/iter 0.98
Evaluator_Draft4_Properties_Closed 99.7011146680335 ns/iter 99.94367764734788 ns/iter 1.00
Evaluator_Draft4_Non_Recursive_Ref 21.000697251774366 ns/iter 19.587089478353874 ns/iter 1.07
Evaluator_Draft4_Pattern_Properties_True 1544.0751768844693 ns/iter 1511.7353634933986 ns/iter 1.02
Evaluator_Draft4_Ref_To_Single_Property 13.517137933358912 ns/iter 13.493455168540487 ns/iter 1.00
Evaluator_Draft4_Additional_Properties_Type 38.76861662413583 ns/iter 38.98827841954643 ns/iter 0.99
Evaluator_Draft4_Nested_Oneof 80.50963851841409 ns/iter 84.15848715998654 ns/iter 0.96
Evaluator_Draft4_Long_Enum 11.857306245192886 ns/iter 14.26440627175276 ns/iter 0.83
Evaluator_Draft4_Type_Object 6.573463341020236 ns/iter 7.266584373036777 ns/iter 0.90
Evaluator_Draft6_Property_Names 173.9303027607643 ns/iter 171.95618297503276 ns/iter 1.01
Evaluator_Draft7_If_Then_Else 32.30972890551073 ns/iter 36.062698503890196 ns/iter 0.90
Evaluator_Draft7_Vercel_1 82867.76914761934 ns/iter 87548.68161981103 ns/iter 0.95
Evaluator_2019_09_Unevaluated_Properties 148.4203716013303 ns/iter 161.7989283920888 ns/iter 0.92
Evaluator_2019_09_OMC_JSON_V2_1 2668.583102058009 ns/iter 5913.522616104509 ns/iter 0.45
Evaluator_2020_12_Dynamic_Ref 625.6638850336269 ns/iter 640.119765063511 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: 6b684b3 Previous: 3eeef65 Ratio
Evaluator_2020_12_Dynamic_Ref 870.9549837858063 ns/iter 872.041039818662 ns/iter 1.00
Evaluator_2019_09_Unevaluated_Properties 238.17301915004535 ns/iter 234.98685549234457 ns/iter 1.01
Evaluator_2019_09_OMC_JSON_V2_1 5168.227035848232 ns/iter 10682.932232934589 ns/iter 0.48
Evaluator_Draft7_If_Then_Else 57.5316108800236 ns/iter 50.18435089122693 ns/iter 1.15
Evaluator_Draft7_Vercel_1 119139.40225498432 ns/iter 113198.54913984743 ns/iter 1.05
Evaluator_Draft6_Property_Names 498.95400291450375 ns/iter 495.1292504023362 ns/iter 1.01
Evaluator_Draft4_Meta_1_No_Callback 427.72823093736673 ns/iter 419.1951811835132 ns/iter 1.02
Evaluator_Draft4_Required_Properties 1699.5309723736382 ns/iter 1680.425593923251 ns/iter 1.01
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 39.66359600635807 ns/iter 38.49729770983766 ns/iter 1.03
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 33.284962747903016 ns/iter 31.98466808770216 ns/iter 1.04
Evaluator_Draft4_Items_Schema 581.0389169258684 ns/iter 547.2613405201914 ns/iter 1.06
Evaluator_Draft4_Nested_Object 3.519733941329023 ns/iter 3.5238304175021793 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Optional 1302.86712432547 ns/iter 1299.2300428594576 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Closed 1038.617698576032 ns/iter 1047.1988223412245 ns/iter 0.99
Evaluator_Draft4_Properties_Triad_Required 1348.1010077257286 ns/iter 1360.3069634267667 ns/iter 0.99
Evaluator_Draft4_Properties_Closed 188.17150324323498 ns/iter 177.0720692894164 ns/iter 1.06
Evaluator_Draft4_Non_Recursive_Ref 49.43212707477112 ns/iter 52.562244557443165 ns/iter 0.94
Evaluator_Draft4_Pattern_Properties_True 1726.5697142203064 ns/iter 1746.499704985518 ns/iter 0.99
Evaluator_Draft4_Ref_To_Single_Property 36.893467864069095 ns/iter 36.21854799447541 ns/iter 1.02
Evaluator_Draft4_Additional_Properties_Type 103.44481891813895 ns/iter 111.85102029818032 ns/iter 0.92
Evaluator_Draft4_Nested_Oneof 112.2552542531808 ns/iter 107.73390082160326 ns/iter 1.04
Evaluator_Draft4_Long_Enum 19.812486549336278 ns/iter 19.60577161050829 ns/iter 1.01
Evaluator_Draft4_Type_Object 10.282668416143459 ns/iter 9.990235694837395 ns/iter 1.03
Compiler_2019_09_OMC_JSON_V2 11205384157.9999 ns/iter 11526075736.000053 ns/iter 0.97
Compiler_Draft6_AdaptiveCard 65456100031.99999 ns/iter 66154228071.00003 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: 6b684b3 Previous: 3eeef65 Ratio
Compiler_Draft6_AdaptiveCard 121418590099.99995 ns/iter 120345777099.99997 ns/iter 1.01
Compiler_2019_09_OMC_JSON_V2 25135184699.99997 ns/iter 25637872600.00004 ns/iter 0.98
Evaluator_Draft4_Meta_1_No_Callback 438.780628005168 ns/iter 458.0976652416597 ns/iter 0.96
Evaluator_Draft4_Required_Properties 736.5248883929152 ns/iter 712.613392857188 ns/iter 1.03
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 36.15237007040563 ns/iter 35.22342163913058 ns/iter 1.03
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 22.221549999997592 ns/iter 21.195815625002723 ns/iter 1.05
Evaluator_Draft4_Items_Schema 667.5066071428505 ns/iter 597.6415178570805 ns/iter 1.12
Evaluator_Draft4_Nested_Object 3.8141523437503926 ns/iter 4.066458547291675 ns/iter 0.94
Evaluator_Draft4_Properties_Triad_Optional 4380.438124999841 ns/iter 4251.171003941876 ns/iter 1.03
Evaluator_Draft4_Properties_Triad_Closed 3522.895221862609 ns/iter 3418.6681136929997 ns/iter 1.03
Evaluator_Draft4_Properties_Triad_Required 4414.462500000127 ns/iter 4299.604999999929 ns/iter 1.03
Evaluator_Draft4_Properties_Closed 143.09884852237337 ns/iter 140.3350450743364 ns/iter 1.02
Evaluator_Draft4_Non_Recursive_Ref 14.898959821429969 ns/iter 15.847501268537812 ns/iter 0.94
Evaluator_Draft4_Pattern_Properties_True 7052.571428571851 ns/iter 6859.258035714584 ns/iter 1.03
Evaluator_Draft4_Ref_To_Single_Property 22.813074999998406 ns/iter 22.53760625000112 ns/iter 1.01
Evaluator_Draft4_Additional_Properties_Type 33.39598244019311 ns/iter 28.467665178568375 ns/iter 1.17
Evaluator_Draft4_Nested_Oneof 153.6311160714224 ns/iter 140.7851428571202 ns/iter 1.09
Evaluator_Draft4_Long_Enum 22.780285460044183 ns/iter 21.740299999997603 ns/iter 1.05
Evaluator_Draft4_Type_Object 9.88748031300233 ns/iter 9.915028080735913 ns/iter 1.00
Evaluator_Draft6_Property_Names 415.37064217092626 ns/iter 417.5703732811415 ns/iter 0.99
Evaluator_Draft7_If_Then_Else 53.62727678572249 ns/iter 50.67727000000559 ns/iter 1.06
Evaluator_Draft7_Vercel_1 113537.00000000799 ns/iter 111025.14062500291 ns/iter 1.02
Evaluator_2019_09_Unevaluated_Properties 427.2051875000215 ns/iter 427.4338725899814 ns/iter 1.00
Evaluator_2019_09_OMC_JSON_V2_1 4118.359565429822 ns/iter 9332.440033749856 ns/iter 0.44
Evaluator_2020_12_Dynamic_Ref 1351.0005357143687 ns/iter 1334.2343373953854 ns/iter 1.01

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

Please sign in to comment.