Skip to content

Commit

Permalink
Get subschema parents for framed pointers (#1559)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti authored Feb 12, 2025
1 parent db9f42f commit 010719c
Show file tree
Hide file tree
Showing 11 changed files with 723 additions and 709 deletions.
12 changes: 6 additions & 6 deletions src/core/jsonschema/frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,6 @@ static auto traverse_origin_instance_locations(
destination.push_back(current.value());
}

// TODO: This whole algorithm gets simpler if let Pointer locations
// point to parents, as we can get the Pointer location from a reference

for (const auto &reference : references) {
if (reference.first.second.back().to_property() == "$schema") {
continue;
Expand Down Expand Up @@ -258,13 +255,15 @@ static auto traverse_origin_instance_locations(
}

for (const auto &location : frame) {
// TODO: Simplify this logic given that Pointers now have parents. We can
// stop looking for .initial(), and if the location is not a subschema or
// resource, we just get the parent
if (location.second.type !=
sourcemeta::core::SchemaFrame::LocationType::Resource &&
location.second.type !=
sourcemeta::core::SchemaFrame::LocationType::Subschema) {
continue;
}

if (location.second.pointer != reference.first.second.initial()) {
continue;
}
Expand Down Expand Up @@ -715,8 +714,7 @@ auto SchemaFrame::analyse(const JSON &schema, const SchemaWalker &walker,
current_base, pointer,
pointer.resolve_from(nearest_bases.second),
dialects.first.front(), current_base_dialect, {},
// TODO: Get real parent
std::nullopt);
dialects.second);
}
}
}
Expand Down Expand Up @@ -900,6 +898,8 @@ auto SchemaFrame::analyse(const JSON &schema, const SchemaWalker &walker,
}

// This is guaranteed to be top-down
// TODO: Looping over the subschemas array means we never fix-up
// instance locations for anchors
for (auto &entry : subschemas) {
repopulate_instance_locations(
this->instances_, subschemas, this->locations_, entry.first,
Expand Down
309 changes: 153 additions & 156 deletions test/jsonschema/jsonschema_frame_2019_09_test.cc

Large diffs are not rendered by default.

264 changes: 134 additions & 130 deletions test/jsonschema/jsonschema_frame_2020_12_test.cc

Large diffs are not rendered by default.

79 changes: 41 additions & 38 deletions test/jsonschema/jsonschema_frame_draft0_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,23 @@ TEST(JSONSchema_frame_draft0, anonymous_with_nested_schema_resource) {
EXPECT_ANONYMOUS_FRAME_STATIC_POINTER(
frame, "https://example.com#/id", "/additionalProperties/id",
"http://json-schema.org/draft-00/schema#",
"http://json-schema.org/draft-00/hyper-schema#", {}, std::nullopt);
"http://json-schema.org/draft-00/hyper-schema#", {},
"/additionalProperties");
EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA(
frame, "", "", "http://json-schema.org/draft-00/schema#",
"http://json-schema.org/draft-00/hyper-schema#", {""}, std::nullopt);
EXPECT_ANONYMOUS_FRAME_STATIC_POINTER(
frame, "#/$schema", "/$schema", "http://json-schema.org/draft-00/schema#",
"http://json-schema.org/draft-00/hyper-schema#", {}, std::nullopt);
"http://json-schema.org/draft-00/hyper-schema#", {}, "");
EXPECT_ANONYMOUS_FRAME_STATIC_SUBSCHEMA(
frame, "#/additionalProperties", "/additionalProperties",
"http://json-schema.org/draft-00/schema#",
"http://json-schema.org/draft-00/hyper-schema#", {"/~P~"}, "");
EXPECT_ANONYMOUS_FRAME_STATIC_POINTER(
frame, "#/additionalProperties/id", "/additionalProperties/id",
"http://json-schema.org/draft-00/schema#",
"http://json-schema.org/draft-00/hyper-schema#", {}, std::nullopt);
"http://json-schema.org/draft-00/hyper-schema#", {},
"/additionalProperties");

// References

Expand Down Expand Up @@ -105,11 +107,11 @@ TEST(JSONSchema_frame_draft0, empty_schema) {
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/id",
"https://www.sourcemeta.com/schema", "/id",
"https://www.sourcemeta.com/schema", "/id", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/id", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/$schema",
"https://www.sourcemeta.com/schema", "/$schema",
"https://www.sourcemeta.com/schema", "/$schema", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/$schema", {}, "");

// References

Expand Down Expand Up @@ -142,11 +144,11 @@ TEST(JSONSchema_frame_draft0, empty_schema_trailing_hash) {
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/id",
"https://www.sourcemeta.com/schema", "/id",
"https://www.sourcemeta.com/schema", "/id", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/id", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/$schema",
"https://www.sourcemeta.com/schema", "/$schema",
"https://www.sourcemeta.com/schema", "/$schema", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/$schema", {}, "");

// References

Expand Down Expand Up @@ -183,23 +185,23 @@ TEST(JSONSchema_frame_draft0, one_level_applicators_without_identifiers) {
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/id",
"https://www.sourcemeta.com/schema", "/id",
"https://www.sourcemeta.com/schema", "/id", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/id", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/$schema",
"https://www.sourcemeta.com/schema", "/$schema",
"https://www.sourcemeta.com/schema", "/$schema", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/$schema", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA(
frame, "https://www.sourcemeta.com/schema#/items",
"https://www.sourcemeta.com/schema", "/items",
"https://www.sourcemeta.com/schema", "/items", {"/~I~"}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/items/type",
"https://www.sourcemeta.com/schema", "/items/type",
"https://www.sourcemeta.com/schema", "/items/type", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/items/type", {}, "/items");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/properties",
"https://www.sourcemeta.com/schema", "/properties",
"https://www.sourcemeta.com/schema", "/properties", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/properties", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA(
frame, "https://www.sourcemeta.com/schema#/properties/foo",
"https://www.sourcemeta.com/schema", "/properties/foo",
Expand All @@ -208,7 +210,7 @@ TEST(JSONSchema_frame_draft0, one_level_applicators_without_identifiers) {
frame, "https://www.sourcemeta.com/schema#/properties/foo/type",
"https://www.sourcemeta.com/schema", "/properties/foo/type",
"https://www.sourcemeta.com/schema", "/properties/foo/type", {},
std::nullopt);
"/properties/foo");

// References

Expand Down Expand Up @@ -246,31 +248,31 @@ TEST(JSONSchema_frame_draft0, one_level_applicators_with_identifiers) {
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/test/qux#/id",
"https://www.sourcemeta.com/test/qux", "/id",
"https://www.sourcemeta.com/test/qux", "/id", {}, std::nullopt);
"https://www.sourcemeta.com/test/qux", "/id", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/test/qux#/$schema",
"https://www.sourcemeta.com/test/qux", "/$schema",
"https://www.sourcemeta.com/test/qux", "/$schema", {}, std::nullopt);
"https://www.sourcemeta.com/test/qux", "/$schema", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA(
frame, "https://www.sourcemeta.com/test/qux#/items",
"https://www.sourcemeta.com/test/qux", "/items",
"https://www.sourcemeta.com/foo", "", {"/~I~"}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/test/qux#/items/id",
"https://www.sourcemeta.com/test/qux", "/items/id",
"https://www.sourcemeta.com/foo", "/id", {}, std::nullopt);
"https://www.sourcemeta.com/foo", "/id", {}, "/items");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/test/qux#/items/type",
"https://www.sourcemeta.com/test/qux", "/items/type",
"https://www.sourcemeta.com/foo", "/type", {}, std::nullopt);
"https://www.sourcemeta.com/foo", "/type", {}, "/items");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/foo#/id",
"https://www.sourcemeta.com/test/qux", "/items/id",
"https://www.sourcemeta.com/foo", "/id", {}, std::nullopt);
"https://www.sourcemeta.com/foo", "/id", {}, "/items");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/foo#/type",
"https://www.sourcemeta.com/test/qux", "/items/type",
"https://www.sourcemeta.com/foo", "/type", {}, std::nullopt);
"https://www.sourcemeta.com/foo", "/type", {}, "/items");

// References

Expand Down Expand Up @@ -311,31 +313,31 @@ TEST(JSONSchema_frame_draft0, subschema_absolute_identifier) {
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/id",
"https://www.sourcemeta.com/schema", "/id",
"https://www.sourcemeta.com/schema", "/id", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/id", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/$schema",
"https://www.sourcemeta.com/schema", "/$schema",
"https://www.sourcemeta.com/schema", "/$schema", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/$schema", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA(
frame, "https://www.sourcemeta.com/schema#/items",
"https://www.sourcemeta.com/schema", "/items",
"https://www.sourcemeta.com/foo", "", {"/~I~"}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/items/id",
"https://www.sourcemeta.com/schema", "/items/id",
"https://www.sourcemeta.com/foo", "/id", {}, std::nullopt);
"https://www.sourcemeta.com/foo", "/id", {}, "/items");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/items/type",
"https://www.sourcemeta.com/schema", "/items/type",
"https://www.sourcemeta.com/foo", "/type", {}, std::nullopt);
"https://www.sourcemeta.com/foo", "/type", {}, "/items");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/foo#/id",
"https://www.sourcemeta.com/schema", "/items/id",
"https://www.sourcemeta.com/foo", "/id", {}, std::nullopt);
"https://www.sourcemeta.com/foo", "/id", {}, "/items");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/foo#/type",
"https://www.sourcemeta.com/schema", "/items/type",
"https://www.sourcemeta.com/foo", "/type", {}, std::nullopt);
"https://www.sourcemeta.com/foo", "/type", {}, "/items");

// References

Expand Down Expand Up @@ -384,11 +386,11 @@ TEST(JSONSchema_frame_draft0, explicit_argument_id_same) {
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/id",
"https://www.sourcemeta.com/schema", "/id",
"https://www.sourcemeta.com/schema", "/id", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/id", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/$schema",
"https://www.sourcemeta.com/schema", "/$schema",
"https://www.sourcemeta.com/schema", "/$schema", {}, std::nullopt);
"https://www.sourcemeta.com/schema", "/$schema", {}, "");

// References

Expand Down Expand Up @@ -443,41 +445,42 @@ TEST(JSONSchema_frame_draft0, explicit_argument_id_different) {

// JSON Pointers

EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/id",
"https://www.sourcemeta.com/schema", "/id", "https://www.example.com",
"/id", {}, std::nullopt);
EXPECT_FRAME_STATIC_DRAFT0_POINTER(frame,
"https://www.sourcemeta.com/schema#/id",
"https://www.sourcemeta.com/schema", "/id",
"https://www.example.com", "/id", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/$schema",
"https://www.sourcemeta.com/schema", "/$schema",
"https://www.example.com", "/$schema", {}, std::nullopt);
"https://www.example.com", "/$schema", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/properties",
"https://www.sourcemeta.com/schema", "/properties",
"https://www.example.com", "/properties", {}, std::nullopt);
"https://www.example.com", "/properties", {}, "");
EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA(
frame, "https://www.sourcemeta.com/schema#/properties/one",
"https://www.sourcemeta.com/schema", "/properties/one",
"https://www.example.com/test", "", {"/one"}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/properties/one/id",
"https://www.sourcemeta.com/schema", "/properties/one/id",
"https://www.example.com/test", "/id", {}, std::nullopt);
"https://www.example.com/test", "/id", {}, "/properties/one");
EXPECT_FRAME_STATIC_DRAFT0_SUBSCHEMA(
frame, "https://www.sourcemeta.com/schema#/properties/two",
"https://www.sourcemeta.com/schema", "/properties/two",
"https://www.test.com", "", {"/two"}, "");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/schema#/properties/two/id",
"https://www.sourcemeta.com/schema", "/properties/two/id",
"https://www.test.com", "/id", {}, std::nullopt);
"https://www.test.com", "/id", {}, "/properties/two");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.sourcemeta.com/test#/id",
"https://www.sourcemeta.com/schema", "/properties/one/id",
"https://www.example.com/test", "/id", {}, std::nullopt);
"https://www.example.com/test", "/id", {}, "/properties/one");
EXPECT_FRAME_STATIC_DRAFT0_POINTER(
frame, "https://www.test.com#/id", "https://www.sourcemeta.com/schema",
"/properties/two/id", "https://www.test.com", "/id", {}, std::nullopt);
"/properties/two/id", "https://www.test.com", "/id", {},
"/properties/two");

// References

Expand Down Expand Up @@ -506,10 +509,10 @@ TEST(JSONSchema_frame_draft0, ref_metaschema) {
"http://json-schema.org/draft-00/hyper-schema#", {""}, std::nullopt);
EXPECT_ANONYMOUS_FRAME_STATIC_POINTER(
frame, "#/$schema", "/$schema", "http://json-schema.org/draft-00/schema#",
"http://json-schema.org/draft-00/hyper-schema#", {}, std::nullopt);
"http://json-schema.org/draft-00/hyper-schema#", {}, "");
EXPECT_ANONYMOUS_FRAME_STATIC_POINTER(
frame, "#/$ref", "/$ref", "http://json-schema.org/draft-00/schema#",
"http://json-schema.org/draft-00/hyper-schema#", {}, std::nullopt);
"http://json-schema.org/draft-00/hyper-schema#", {}, "");

// References

Expand Down
Loading

5 comments on commit 010719c

@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: 010719c Previous: db9f42f Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.5667797981384788 ns/iter 1.6969779303622774 ns/iter 0.92
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.5707662529679909 ns/iter 1.6537914376966452 ns/iter 0.95
Regex_Period_Asterisk 1.569334284170919 ns/iter 1.6218964110142 ns/iter 0.97
Regex_Group_Period_Asterisk_Group 1.5693385813194043 ns/iter 1.6654720964895349 ns/iter 0.94
Regex_Period_Plus 1.892792458382357 ns/iter 2.0347544779066085 ns/iter 0.93
Regex_Period 1.9201185825543052 ns/iter 2.059588959682956 ns/iter 0.93
Regex_Caret_Period_Plus_Dollar 1.8847032354649271 ns/iter 2.0617621665977444 ns/iter 0.91
Regex_Caret_Group_Period_Plus_Group_Dollar 1.980251716713448 ns/iter 2.015236941610491 ns/iter 0.98
Regex_Caret_Period_Asterisk_Dollar 1.7270817680157806 ns/iter 1.6866672512526348 ns/iter 1.02
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.7051511759395532 ns/iter 1.719673159168714 ns/iter 0.99
Regex_Caret_X_Hyphen 6.747904513940567 ns/iter 7.17748001036304 ns/iter 0.94
Regex_Period_Md_Dollar 72.87738980245173 ns/iter 72.72180113833933 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 6.9262231560535135 ns/iter 5.279555503456362 ns/iter 1.31
Regex_Caret_Period_Range_Dollar 2.132000780522477 ns/iter 2.360940838734383 ns/iter 0.90
Regex_Nested_Backtrack 769.2083747635635 ns/iter 778.9794467737499 ns/iter 0.99
JSON_Array_Of_Objects_Unique 333.0947732918431 ns/iter 354.22858328170287 ns/iter 0.94
JSON_Parse_1 21441.266204623957 ns/iter 22580.20516957441 ns/iter 0.95
JSON_Fast_Hash_Helm_Chart_Lock 47.770846100135664 ns/iter 52.81175941338424 ns/iter 0.90
JSON_Equality_Helm_Chart_Lock 127.58759989170568 ns/iter 127.8198811644173 ns/iter 1.00
JSON_String_Equal/10 7.913667507282053 ns/iter 8.03609740840637 ns/iter 0.98
JSON_String_Equal/100 6.508983023289169 ns/iter 6.474430522489141 ns/iter 1.01
JSON_String_Equal_Small_By_Perfect_Hash/10 0.3152053660634752 ns/iter 0.3386063790518811 ns/iter 0.93
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 2.9262183164542734 ns/iter 3.111119474856595 ns/iter 0.94
JSON_String_Fast_Hash/10 1.5687265304482625 ns/iter 1.713055517093208 ns/iter 0.92
JSON_String_Fast_Hash/100 1.8957970524463634 ns/iter 2.029186471542069 ns/iter 0.93
JSON_String_Key_Hash/10 1.2547065619823448 ns/iter 1.3509642276899696 ns/iter 0.93
JSON_String_Key_Hash/100 1.2580401815523246 ns/iter 1.353659769541288 ns/iter 0.93
JSON_Object_Defines_Miss_Same_Length 2.197415820766739 ns/iter 2.352212443112215 ns/iter 0.93
JSON_Object_Defines_Miss_Too_Small 2.205420813589854 ns/iter 2.3566932273287433 ns/iter 0.94
JSON_Object_Defines_Miss_Too_Large 2.1955000583532223 ns/iter 2.399895153193359 ns/iter 0.91
Pointer_Object_Traverse 15.366821798440403 ns/iter 16.495733018928743 ns/iter 0.93
Pointer_Object_Try_Traverse 22.085708716304833 ns/iter 23.37830198401565 ns/iter 0.94
Pointer_Push_Back_Pointer_To_Weak_Pointer 173.15346858133324 ns/iter 187.9373333031175 ns/iter 0.92
Schema_Frame_OMC_Instances 292353562.5000113 ns/iter 339167250.0000027 ns/iter 0.86
Schema_Frame_OMC_References 96983404.71428373 ns/iter 107564642.85714173 ns/iter 0.90
Schema_Bundle_Meta_2020_12 4385349.52865614 ns/iter 4709245.993113843 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/llvm)

Benchmark suite Current: 010719c Previous: db9f42f Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.2518661482279327 ns/iter 2.2090097909675817 ns/iter 1.02
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.240123291286449 ns/iter 2.1830855940934875 ns/iter 1.03
Regex_Period_Asterisk 2.2106450124953696 ns/iter 2.1769104580546865 ns/iter 1.02
Regex_Group_Period_Asterisk_Group 2.2063392287131087 ns/iter 2.180531802570286 ns/iter 1.01
Regex_Period_Plus 2.371228526006348 ns/iter 2.4872583053061597 ns/iter 0.95
Regex_Period 2.2280883673484264 ns/iter 2.4862080862197935 ns/iter 0.90
Regex_Caret_Period_Plus_Dollar 2.2189642507566196 ns/iter 2.4946554093918953 ns/iter 0.89
Regex_Caret_Group_Period_Plus_Group_Dollar 2.230066493061118 ns/iter 2.4862790895047553 ns/iter 0.90
Regex_Caret_Period_Asterisk_Dollar 2.2057497274969826 ns/iter 2.180308867611999 ns/iter 1.01
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.204249855895221 ns/iter 2.186379659959061 ns/iter 1.01
Regex_Caret_X_Hyphen 13.058771214600556 ns/iter 12.614834481828822 ns/iter 1.04
Regex_Period_Md_Dollar 78.07304381175582 ns/iter 73.74201248436147 ns/iter 1.06
Regex_Caret_Slash_Period_Asterisk 5.91245512516276 ns/iter 6.214372231739053 ns/iter 0.95
Regex_Caret_Period_Range_Dollar 2.8002443539781106 ns/iter 2.797825248042643 ns/iter 1.00
Regex_Nested_Backtrack 495.4837582846671 ns/iter 450.9598773370686 ns/iter 1.10
JSON_Array_Of_Objects_Unique 404.414232370154 ns/iter 398.6082260948988 ns/iter 1.01
JSON_Parse_1 30266.688995838387 ns/iter 30181.25444655608 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 59.91671184299914 ns/iter 59.5083667158281 ns/iter 1.01
JSON_Equality_Helm_Chart_Lock 146.48030744118182 ns/iter 152.52687408362263 ns/iter 0.96
JSON_String_Equal/10 6.2266338904151715 ns/iter 7.776523505218169 ns/iter 0.80
JSON_String_Equal/100 6.9168759180792225 ns/iter 8.155807102710265 ns/iter 0.85
JSON_String_Equal_Small_By_Perfect_Hash/10 0.936195742473824 ns/iter 0.9352578707449978 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 10.258641534007587 ns/iter 10.255401715773337 ns/iter 1.00
JSON_String_Fast_Hash/10 2.176395784858601 ns/iter 2.177614989592317 ns/iter 1.00
JSON_String_Fast_Hash/100 2.176918533937224 ns/iter 2.17708516951395 ns/iter 1.00
JSON_String_Key_Hash/10 1.8674405426231242 ns/iter 1.8691517263997213 ns/iter 1.00
JSON_String_Key_Hash/100 2.178671090689425 ns/iter 2.1786883979136658 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.7428795522248453 ns/iter 3.734101925700926 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.733424981378049 ns/iter 3.7372961851893103 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.733510742578441 ns/iter 3.738760481185027 ns/iter 1.00
Pointer_Object_Traverse 44.28382440313021 ns/iter 45.62763098592297 ns/iter 0.97
Pointer_Object_Try_Traverse 52.28259809455598 ns/iter 52.34466267840637 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 286.5710221037695 ns/iter 335.4018719522831 ns/iter 0.85
Schema_Frame_OMC_Instances 424862517.0000082 ns/iter 409146762.50002915 ns/iter 1.04
Schema_Frame_OMC_References 142004759.79998827 ns/iter 138729845.00001165 ns/iter 1.02
Schema_Bundle_Meta_2020_12 6856115.079205377 ns/iter 6727918.201928691 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 (windows/msvc)

Benchmark suite Current: 010719c Previous: db9f42f Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 6.707093750000226 ns/iter 6.559928571428587 ns/iter 1.02
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 6.53218839285736 ns/iter 6.536629464287205 ns/iter 1.00
Regex_Period_Asterisk 6.618804687499948 ns/iter 6.602618303571513 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 6.843577008928443 ns/iter 6.62839174107128 ns/iter 1.03
Regex_Period_Plus 6.831445312500049 ns/iter 6.849220982143578 ns/iter 1.00
Regex_Period 7.003697544642711 ns/iter 7.094682557612592 ns/iter 0.99
Regex_Caret_Period_Plus_Dollar 6.922352647667115 ns/iter 6.8611584821428755 ns/iter 1.01
Regex_Caret_Group_Period_Plus_Group_Dollar 6.866556919641807 ns/iter 6.894945535715839 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 6.643734375000321 ns/iter 6.6272544642867866 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 6.60669084821462 ns/iter 6.552895876541681 ns/iter 1.01
Regex_Caret_X_Hyphen 14.420583417764686 ns/iter 14.432942346280342 ns/iter 1.00
Regex_Period_Md_Dollar 153.208124999996 ns/iter 156.04620535713462 ns/iter 0.98
Regex_Caret_Slash_Period_Asterisk 10.34531781095874 ns/iter 10.292451562499139 ns/iter 1.01
Regex_Caret_Period_Range_Dollar 7.273641931814199 ns/iter 7.824308035715433 ns/iter 0.93
Regex_Nested_Backtrack 590.2264999999716 ns/iter 597.5683035714496 ns/iter 0.99
JSON_Array_Of_Objects_Unique 411.61874065471625 ns/iter 416.01060196387834 ns/iter 0.99
JSON_Parse_1 96130.73523503896 ns/iter 80480.22321427746 ns/iter 1.19
JSON_Fast_Hash_Helm_Chart_Lock 56.228267857148595 ns/iter 62.02308000001722 ns/iter 0.91
JSON_Equality_Helm_Chart_Lock 186.28099877510346 ns/iter 188.97674008719875 ns/iter 0.99
JSON_String_Equal/10 9.34595486899076 ns/iter 9.543672278823056 ns/iter 0.98
JSON_String_Equal/100 9.923896830695854 ns/iter 10.001724062490732 ns/iter 0.99
JSON_String_Equal_Small_By_Perfect_Hash/10 2.169432812500105 ns/iter 2.1674737499999708 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.334458641362334 ns/iter 14.587085425949116 ns/iter 0.98
JSON_String_Fast_Hash/10 3.098056250000322 ns/iter 3.0989513392855526 ns/iter 1.00
JSON_String_Fast_Hash/100 3.1012732142861363 ns/iter 3.0975736607144553 ns/iter 1.00
JSON_String_Key_Hash/10 7.494944162969614 ns/iter 7.4908928237023185 ns/iter 1.00
JSON_String_Key_Hash/100 3.7338412433319914 ns/iter 3.7139678505118505 ns/iter 1.01
JSON_Object_Defines_Miss_Same_Length 4.042145141146813 ns/iter 4.0248818375451245 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.407724368914921 ns/iter 3.4143224046176264 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.7184833862172084 ns/iter 3.7146680290820266 ns/iter 1.00
Pointer_Object_Traverse 52.24733928571368 ns/iter 53.048062500014986 ns/iter 0.98
Pointer_Object_Try_Traverse 65.59160714285132 ns/iter 65.50684151786105 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 166.41395310809222 ns/iter 159.17101735515013 ns/iter 1.05
Schema_Frame_OMC_Instances 709811399.9999213 ns/iter 717552699.999942 ns/iter 0.99
Schema_Frame_OMC_References 357874999.9999786 ns/iter 355254749.99997187 ns/iter 1.01
Schema_Bundle_Meta_2020_12 16423470.731704738 ns/iter 16453209.756103361 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/gcc)

Benchmark suite Current: 010719c Previous: db9f42f Ratio
Schema_Frame_OMC_Instances 422010475.5000307 ns/iter 425855987.49997187 ns/iter 0.99
Schema_Frame_OMC_References 140533778.1999833 ns/iter 142670743.9999973 ns/iter 0.99
Schema_Bundle_Meta_2020_12 6959120.119990984 ns/iter 6876973.607844838 ns/iter 1.01
Pointer_Object_Traverse 46.1084285827285 ns/iter 46.062431280581855 ns/iter 1.00
Pointer_Object_Try_Traverse 23.392762115259877 ns/iter 23.384162982469814 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 134.62582104751567 ns/iter 177.2047384201874 ns/iter 0.76
JSON_Array_Of_Objects_Unique 423.00929408606345 ns/iter 423.25757770267427 ns/iter 1.00
JSON_Parse_1 33466.914755354715 ns/iter 33508.9286977319 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 69.0163638585673 ns/iter 68.88593311264414 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 143.9077099250209 ns/iter 144.00894714688997 ns/iter 1.00
JSON_String_Equal/10 6.047846673972149 ns/iter 6.024817424773365 ns/iter 1.00
JSON_String_Equal/100 6.6563488418733945 ns/iter 6.656809747967043 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.6308464414419396 ns/iter 0.6229083638727867 ns/iter 1.01
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 25.474904114894112 ns/iter 25.479792650400356 ns/iter 1.00
JSON_String_Fast_Hash/10 0.933906736996864 ns/iter 0.933475822949401 ns/iter 1.00
JSON_String_Fast_Hash/100 0.9355410862644576 ns/iter 0.9381179272144423 ns/iter 1.00
JSON_String_Key_Hash/10 1.245426215913529 ns/iter 1.245772243374049 ns/iter 1.00
JSON_String_Key_Hash/100 0.9348038192445032 ns/iter 0.9338085274489901 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 2.490102084598906 ns/iter 2.488234377836717 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 2.7969917548522805 ns/iter 2.79606034632162 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 2.4908709789287307 ns/iter 2.494283579042811 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 3.4176303246082376 ns/iter 3.4195244807507548 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.4194819631133937 ns/iter 3.419505366399829 ns/iter 1.00
Regex_Period_Asterisk 3.41962920978787 ns/iter 3.418214957934693 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 3.4191397560380046 ns/iter 3.4186000403639474 ns/iter 1.00
Regex_Period_Plus 3.734267749065159 ns/iter 3.7431832012852637 ns/iter 1.00
Regex_Period 3.7371822127642864 ns/iter 3.7459012775297804 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 3.737412025751979 ns/iter 3.8014450456426254 ns/iter 0.98
Regex_Caret_Group_Period_Plus_Group_Dollar 3.647532509989526 ns/iter 3.7440320443584905 ns/iter 0.97
Regex_Caret_Period_Asterisk_Dollar 3.7323136268651558 ns/iter 4.662690766686291 ns/iter 0.80
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.731966805476214 ns/iter 4.661140980997682 ns/iter 0.80
Regex_Caret_X_Hyphen 13.154708215021317 ns/iter 13.715343540911077 ns/iter 0.96
Regex_Period_Md_Dollar 88.75723766302752 ns/iter 88.70257393808946 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 9.634848685387036 ns/iter 9.63883422599566 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 4.973944593031027 ns/iter 4.947261589818623 ns/iter 1.01
Regex_Nested_Backtrack 823.6799430757834 ns/iter 825.3913520246005 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 (macos/gcc)

Benchmark suite Current: 010719c Previous: db9f42f Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.040920597539682 ns/iter 1.9233008375032064 ns/iter 1.06
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.044658412568945 ns/iter 1.9959021806241168 ns/iter 1.02
Regex_Period_Asterisk 2.008823608749155 ns/iter 1.940987678541792 ns/iter 1.03
Regex_Group_Period_Asterisk_Group 2.069972560906676 ns/iter 1.90731593931194 ns/iter 1.09
Regex_Period_Plus 2.0113598337095784 ns/iter 1.5910157639060793 ns/iter 1.26
Regex_Period 1.8558689645119597 ns/iter 1.6034193789763214 ns/iter 1.16
Regex_Caret_Period_Plus_Dollar 1.7419425727420792 ns/iter 1.5961250772464521 ns/iter 1.09
Regex_Caret_Group_Period_Plus_Group_Dollar 1.7196623262939619 ns/iter 1.6551180245833568 ns/iter 1.04
Regex_Caret_Period_Asterisk_Dollar 2.0029986828751265 ns/iter 1.9220622484878018 ns/iter 1.04
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.997378738118655 ns/iter 1.9706068275574888 ns/iter 1.01
Regex_Caret_X_Hyphen 6.502617002782928 ns/iter 6.01749034787713 ns/iter 1.08
Regex_Period_Md_Dollar 73.69846083478964 ns/iter 69.48885905723797 ns/iter 1.06
Regex_Caret_Slash_Period_Asterisk 4.78698301713113 ns/iter 4.485406548012177 ns/iter 1.07
Regex_Caret_Period_Range_Dollar 2.071332124349213 ns/iter 1.9016638457531716 ns/iter 1.09
Regex_Nested_Backtrack 944.810188518717 ns/iter 873.5286921841652 ns/iter 1.08
JSON_Array_Of_Objects_Unique 226.34232373555048 ns/iter 204.13249520515734 ns/iter 1.11
JSON_Parse_1 25754.23650783713 ns/iter 23244.46267177182 ns/iter 1.11
JSON_Fast_Hash_Helm_Chart_Lock 25.68465562868963 ns/iter 23.780181520058957 ns/iter 1.08
JSON_Equality_Helm_Chart_Lock 129.4848683165929 ns/iter 114.47290627001918 ns/iter 1.13
JSON_String_Equal/10 5.907737591431257 ns/iter 5.425453234902007 ns/iter 1.09
JSON_String_Equal/100 5.647333291539137 ns/iter 5.200646958632122 ns/iter 1.09
JSON_String_Equal_Small_By_Perfect_Hash/10 0.8323424405218937 ns/iter 0.761705173412671 ns/iter 1.09
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.836305391272095 ns/iter 3.501001003930137 ns/iter 1.10
JSON_String_Fast_Hash/10 2.0766048713612273 ns/iter 1.9086685961269234 ns/iter 1.09
JSON_String_Fast_Hash/100 2.1095590326369504 ns/iter 2.041893046531738 ns/iter 1.03
JSON_String_Key_Hash/10 1.57835601413447 ns/iter 1.453865849758667 ns/iter 1.09
JSON_String_Key_Hash/100 2.110326249316784 ns/iter 1.9306889566762042 ns/iter 1.09
JSON_Object_Defines_Miss_Same_Length 1.8957476431763698 ns/iter 1.750757048916188 ns/iter 1.08
JSON_Object_Defines_Miss_Too_Small 2.031341942128392 ns/iter 1.9261170397397234 ns/iter 1.05
JSON_Object_Defines_Miss_Too_Large 1.9145921742124115 ns/iter 1.8091539283849463 ns/iter 1.06
Pointer_Object_Traverse 53.03240730885199 ns/iter 56.44023196460321 ns/iter 0.94
Pointer_Object_Try_Traverse 37.00495150568375 ns/iter 35.278662374370015 ns/iter 1.05
Pointer_Push_Back_Pointer_To_Weak_Pointer 161.47211335842812 ns/iter 170.00040577812217 ns/iter 0.95
Schema_Frame_OMC_Instances 361791968.3456421 ns/iter 363878607.74993896 ns/iter 0.99
Schema_Frame_OMC_References 109534660.97513835 ns/iter 101357732.50034878 ns/iter 1.08
Schema_Bundle_Meta_2020_12 5093325.813897222 ns/iter 4637748.603052741 ns/iter 1.10

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

Please sign in to comment.