Skip to content

Commit

Permalink
Avoid copying subschemas in SchemaIteratorEntry (#1523)
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 Feb 5, 2025
1 parent e28f893 commit f12546f
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 122 deletions.
35 changes: 19 additions & 16 deletions src/core/jsonschema/frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ auto internal_analyse(const sourcemeta::core::JSON &schema,

// Schema identifier
std::optional<std::string> id{sourcemeta::core::identify(
entry.value, entry.base_dialect.value(),
entry.subschema.get(), entry.base_dialect.value(),
entry.pointer.empty() ? default_id : std::nullopt)};

// Store information
Expand All @@ -278,7 +278,7 @@ auto internal_analyse(const sourcemeta::core::JSON &schema,
supports_id_anchors(entry.common.base_dialect.value()) &&
sourcemeta::core::URI{entry.id.value()}.is_fragment_only();

if ((!entry.common.value.defines("$ref") || !ref_overrides) &&
if ((!entry.common.subschema.get().defines("$ref") || !ref_overrides) &&
// If we are dealing with a pre-2019-09 location independent
// identifier, we ignore it as a traditional identifier and take care
// of it as an anchor
Expand Down Expand Up @@ -323,7 +323,8 @@ auto internal_analyse(const sourcemeta::core::JSON &schema,
}

// Handle metaschema references
const auto maybe_metaschema{sourcemeta::core::dialect(entry.common.value)};
const auto maybe_metaschema{
sourcemeta::core::dialect(entry.common.subschema.get())};
if (maybe_metaschema.has_value()) {
sourcemeta::core::URI metaschema{maybe_metaschema.value()};
const auto nearest_bases{
Expand All @@ -334,7 +335,7 @@ auto internal_analyse(const sourcemeta::core::JSON &schema,

metaschema.canonicalize();
const std::string destination{metaschema.recompose()};
assert(entry.common.value.defines("$schema"));
assert(entry.common.subschema.get().defines("$schema"));
references.insert_or_assign(
{SchemaReferenceType::Static,
entry.common.pointer.concat({"$schema"})},
Expand All @@ -344,8 +345,8 @@ auto internal_analyse(const sourcemeta::core::JSON &schema,
}

// Handle schema anchors
for (const auto &[name, type] :
find_anchors(entry.common.value, entry.common.vocabularies)) {
for (const auto &[name, type] : find_anchors(entry.common.subschema.get(),
entry.common.vocabularies)) {
const auto bases{
find_nearest_bases(base_uris, entry.common.pointer, entry.id)};

Expand Down Expand Up @@ -490,12 +491,13 @@ auto internal_analyse(const sourcemeta::core::JSON &schema,

// Resolve references after all framing was performed
for (const auto &entry : subschema_entries) {
if (entry.common.value.is_object()) {
if (entry.common.subschema.get().is_object()) {
const auto nearest_bases{
find_nearest_bases(base_uris, entry.common.pointer, entry.id)};
if (entry.common.value.defines("$ref")) {
assert(entry.common.value.at("$ref").is_string());
sourcemeta::core::URI ref{entry.common.value.at("$ref").to_string()};
if (entry.common.subschema.get().defines("$ref")) {
assert(entry.common.subschema.get().at("$ref").is_string());
sourcemeta::core::URI ref{
entry.common.subschema.get().at("$ref").to_string()};
if (!nearest_bases.first.empty()) {
ref.try_resolve_from(nearest_bases.first.front());
}
Expand All @@ -511,9 +513,10 @@ auto internal_analyse(const sourcemeta::core::JSON &schema,

if (entry.common.vocabularies.contains(
"https://json-schema.org/draft/2019-09/vocab/core") &&
entry.common.value.defines("$recursiveRef")) {
assert(entry.common.value.at("$recursiveRef").is_string());
const auto &ref{entry.common.value.at("$recursiveRef").to_string()};
entry.common.subschema.get().defines("$recursiveRef")) {
assert(entry.common.subschema.get().at("$recursiveRef").is_string());
const auto &ref{
entry.common.subschema.get().at("$recursiveRef").to_string()};

// The behavior of this keyword is defined only for the value "#".
// Implementations MAY choose to consider other values to be errors.
Expand Down Expand Up @@ -542,10 +545,10 @@ auto internal_analyse(const sourcemeta::core::JSON &schema,

if (entry.common.vocabularies.contains(
"https://json-schema.org/draft/2020-12/vocab/core") &&
entry.common.value.defines("$dynamicRef")) {
assert(entry.common.value.at("$dynamicRef").is_string());
entry.common.subschema.get().defines("$dynamicRef")) {
assert(entry.common.subschema.get().at("$dynamicRef").is_string());
sourcemeta::core::URI ref{
entry.common.value.at("$dynamicRef").to_string()};
entry.common.subschema.get().at("$dynamicRef").to_string()};
if (!nearest_bases.first.empty()) {
ref.resolve_from(nearest_bases.first.front());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define SOURCEMETA_CORE_JSONSCHEMA_TYPES_H_

#include <cstdint> // std::uint8_t
#include <functional> // std::function
#include <functional> // std::function, std::reference_wrapper
#include <map> // std::map
#include <optional> // std::optional
#include <set> // std::set
Expand Down Expand Up @@ -193,9 +193,7 @@ struct SchemaIteratorEntry {
std::optional<std::string> dialect;
std::map<std::string, bool> vocabularies;
std::optional<std::string> base_dialect;
// TODO: Do we really need a full copy of the JSON value if the client
// can get it through the JSON Pointer if needed?
JSON value;
std::reference_wrapper<const JSON> subschema;
PointerTemplate relative_instance_location;
bool orphan;
};
Expand Down
28 changes: 12 additions & 16 deletions src/core/jsonschema/walker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ auto walk(const sourcemeta::core::Pointer &pointer,
resolver, base_dialect.value(), new_dialect)};

if (type == SchemaWalkerType_t::Deep || level > 0) {
subschemas.push_back({pointer, new_dialect, vocabularies, base_dialect,
subschema, instance_location, orphan});
sourcemeta::core::SchemaIteratorEntry entry{
pointer, new_dialect, vocabularies, base_dialect,
subschema, instance_location, orphan};
subschemas.push_back(std::move(entry));
}

// We can't recurse any further
Expand Down Expand Up @@ -265,13 +267,10 @@ sourcemeta::core::SchemaIterator::SchemaIterator(
// not pass a default, then there is nothing we can do. We know
// the current schema is a subschema, but cannot walk any further.
if (!dialect.has_value()) {
this->subschemas.push_back({pointer,
std::nullopt,
{},
std::nullopt,
schema,
instance_location,
false});
sourcemeta::core::SchemaIteratorEntry entry{
pointer, std::nullopt, {}, std::nullopt,
schema, instance_location, false};
this->subschemas.push_back(std::move(entry));
} else {
walk(pointer, instance_location, this->subschemas, schema, walker, resolver,
dialect.value(), SchemaWalkerType_t::Deep, 0, false);
Expand Down Expand Up @@ -315,13 +314,10 @@ sourcemeta::core::SchemaKeywordIterator::SchemaKeywordIterator(
}

for (const auto &entry : schema.as_object()) {
this->entries.push_back({{entry.first},
dialect,
vocabularies,
base_dialect,
entry.second,
{},
false});
sourcemeta::core::SchemaIteratorEntry subschema_entry{
{entry.first}, dialect, vocabularies, base_dialect,
entry.second, {}, false};
this->entries.push_back(std::move(subschema_entry));
}

// Sort keywords based on priority for correct evaluation
Expand Down
Loading

5 comments on commit f12546f

@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: f12546f Previous: e28f893 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.223532153544477 ns/iter 2.1997022001952358 ns/iter 1.01
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.200693069815811 ns/iter 2.2046554531363363 ns/iter 1.00
Regex_Period_Asterisk 2.2286196471172897 ns/iter 2.2191815321402393 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.207731289332178 ns/iter 2.2105633966671623 ns/iter 1.00
Regex_Period_Plus 2.797413520604945 ns/iter 2.7967777202652138 ns/iter 1.00
Regex_Period 2.796204287322348 ns/iter 2.80374895129772 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 2.7960698800463826 ns/iter 2.7960898338281224 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 2.7971070262659627 ns/iter 2.7965079851545878 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 3.4165226109209654 ns/iter 3.417094863019677 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.4175329516777255 ns/iter 3.421869834759688 ns/iter 1.00
Regex_Caret_X_Hyphen 13.06836767989205 ns/iter 13.074836384750167 ns/iter 1.00
Regex_Period_Md_Dollar 82.26831985670572 ns/iter 81.28442654137156 ns/iter 1.01
Regex_Caret_Slash_Period_Asterisk 6.841005333660092 ns/iter 6.83994140099907 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 4.039912253670055 ns/iter 4.041652024369153 ns/iter 1.00
Regex_Nested_Backtrack 498.2266313855555 ns/iter 502.5847937471014 ns/iter 0.99
JSON_Array_Of_Objects_Unique 417.1069574950808 ns/iter 405.5259584249761 ns/iter 1.03
JSON_Parse_1 30364.335047535104 ns/iter 30386.635156753833 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 59.43807075482136 ns/iter 59.01537939132889 ns/iter 1.01
JSON_Equality_Helm_Chart_Lock 156.37025342878758 ns/iter 158.29214315104275 ns/iter 0.99
JSON_String_Equal/10 6.569990105477406 ns/iter 6.531492107009188 ns/iter 1.01
JSON_String_Equal/100 7.5541200703760705 ns/iter 7.155910929257327 ns/iter 1.06
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9348779796327182 ns/iter 0.9354920794679388 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 10.258932632997467 ns/iter 10.257755321129464 ns/iter 1.00
JSON_String_Fast_Hash/10 2.488240851772982 ns/iter 2.487418014161257 ns/iter 1.00
JSON_String_Fast_Hash/100 2.48952531822969 ns/iter 2.490986366712908 ns/iter 1.00
JSON_String_Key_Hash/10 2.185854281821994 ns/iter 2.1783543024001353 ns/iter 1.00
JSON_String_Key_Hash/100 1.8823549230127714 ns/iter 1.870667855237645 ns/iter 1.01
JSON_Object_Defines_Miss_Same_Length 3.7360385009898116 ns/iter 3.7394652508965582 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.8974192085539436 ns/iter 3.7410293164603714 ns/iter 1.04
JSON_Object_Defines_Miss_Too_Large 3.7364383440577917 ns/iter 3.7328284515084245 ns/iter 1.00
Pointer_Object_Traverse 44.30062119873428 ns/iter 44.43343932249212 ns/iter 1.00
Pointer_Object_Try_Traverse 52.33566177443641 ns/iter 52.3350855287557 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 290.472041931324 ns/iter 283.63642079705414 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 (macos/llvm)

Benchmark suite Current: f12546f Previous: e28f893 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.8522002300819882 ns/iter 1.7514570703274603 ns/iter 1.06
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.9035151976610512 ns/iter 1.9776053918709604 ns/iter 0.96
Regex_Period_Asterisk 1.9960762520752837 ns/iter 1.8654445935572386 ns/iter 1.07
Regex_Group_Period_Asterisk_Group 2.1929397849599708 ns/iter 2.004088140555349 ns/iter 1.09
Regex_Period_Plus 2.7046423235780557 ns/iter 2.3972901245903224 ns/iter 1.13
Regex_Period 2.78957993517703 ns/iter 2.4328820367055544 ns/iter 1.15
Regex_Caret_Period_Plus_Dollar 2.5964377134831778 ns/iter 2.814083934847453 ns/iter 0.92
Regex_Caret_Group_Period_Plus_Group_Dollar 2.710385338482741 ns/iter 2.346047035653866 ns/iter 1.16
Regex_Caret_Period_Asterisk_Dollar 2.309119074657093 ns/iter 1.8957430794595787 ns/iter 1.22
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.146040470079452 ns/iter 1.9436096461122805 ns/iter 1.10
Regex_Caret_X_Hyphen 8.976273601410353 ns/iter 8.121499697584207 ns/iter 1.11
Regex_Period_Md_Dollar 90.164609273799 ns/iter 79.59511640212979 ns/iter 1.13
Regex_Caret_Slash_Period_Asterisk 6.358046153703013 ns/iter 5.898586865626245 ns/iter 1.08
Regex_Caret_Period_Range_Dollar 3.0194158830627136 ns/iter 2.7922335917841816 ns/iter 1.08
Regex_Nested_Backtrack 965.1640818173034 ns/iter 932.0800876424038 ns/iter 1.04
JSON_Array_Of_Objects_Unique 436.01475218127905 ns/iter 380.684183546649 ns/iter 1.15
JSON_Parse_1 26573.227034593936 ns/iter 24918.30519776155 ns/iter 1.07
JSON_Fast_Hash_Helm_Chart_Lock 56.860897465684396 ns/iter 57.08033340000612 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 177.9108883748849 ns/iter 153.76419848114404 ns/iter 1.16
JSON_String_Equal/10 10.109104635675621 ns/iter 8.964149148744447 ns/iter 1.13
JSON_String_Equal/100 8.173133953163639 ns/iter 8.318791392141163 ns/iter 0.98
JSON_String_Equal_Small_By_Perfect_Hash/10 0.4873219056196888 ns/iter 0.3660150153748787 ns/iter 1.33
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 4.381258700820139 ns/iter 3.3601208466944774 ns/iter 1.30
JSON_String_Fast_Hash/10 2.068874306103191 ns/iter 1.8833972699631325 ns/iter 1.10
JSON_String_Fast_Hash/100 2.6496818324748665 ns/iter 2.1124800802210406 ns/iter 1.25
JSON_String_Key_Hash/10 1.8813247443835952 ns/iter 1.4065791628545217 ns/iter 1.34
JSON_String_Key_Hash/100 1.4647983755254281 ns/iter 1.4282580007261256 ns/iter 1.03
JSON_Object_Defines_Miss_Same_Length 2.7672074343503437 ns/iter 2.4908900096053523 ns/iter 1.11
JSON_Object_Defines_Miss_Too_Small 3.0487914368322757 ns/iter 2.489997458897532 ns/iter 1.22
JSON_Object_Defines_Miss_Too_Large 3.0443192727847928 ns/iter 2.537059913643038 ns/iter 1.20
Pointer_Object_Traverse 23.708572389054584 ns/iter 18.408331648966406 ns/iter 1.29
Pointer_Object_Try_Traverse 33.620806980456656 ns/iter 24.27989142268709 ns/iter 1.38
Pointer_Push_Back_Pointer_To_Weak_Pointer 239.857223296488 ns/iter 183.63177768158437 ns/iter 1.31

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: f12546f Previous: e28f893 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 6.967245535715197 ns/iter 6.861043526785895 ns/iter 1.02
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 7.020504879373534 ns/iter 7.346305803572761 ns/iter 0.96
Regex_Period_Asterisk 7.025453125000882 ns/iter 7.137321428571296 ns/iter 0.98
Regex_Group_Period_Asterisk_Group 6.966484821428967 ns/iter 6.874328124999757 ns/iter 1.01
Regex_Period_Plus 7.285737723215898 ns/iter 7.192777901785519 ns/iter 1.01
Regex_Period 7.380993303571464 ns/iter 7.192094866069912 ns/iter 1.03
Regex_Caret_Period_Plus_Dollar 7.414680803571169 ns/iter 7.2799787946437835 ns/iter 1.02
Regex_Caret_Group_Period_Plus_Group_Dollar 7.474275669644268 ns/iter 7.312540178571985 ns/iter 1.02
Regex_Caret_Period_Asterisk_Dollar 7.6966205357135005 ns/iter 6.924782366071827 ns/iter 1.11
Regex_Caret_Group_Period_Asterisk_Group_Dollar 7.095407111180022 ns/iter 6.970243303570101 ns/iter 1.02
Regex_Caret_X_Hyphen 14.253667410716478 ns/iter 14.27084993628737 ns/iter 1.00
Regex_Period_Md_Dollar 152.18933025937986 ns/iter 151.95667410711368 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 10.283818750000506 ns/iter 10.298678571428711 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 7.862139508927969 ns/iter 7.926274553570677 ns/iter 0.99
Regex_Nested_Backtrack 605.7559821428526 ns/iter 607.597053571445 ns/iter 1.00
JSON_Array_Of_Objects_Unique 484.1455727079628 ns/iter 498.100900000054 ns/iter 0.97
JSON_Parse_1 80068.33705356899 ns/iter 79969.87723214286 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 66.68181250000364 ns/iter 69.51399999999401 ns/iter 0.96
JSON_Equality_Helm_Chart_Lock 187.57962389104395 ns/iter 188.06768643456718 ns/iter 1.00
JSON_String_Equal/10 8.98937406701179 ns/iter 8.989272281299433 ns/iter 1.00
JSON_String_Equal/100 9.948881250000596 ns/iter 10.021490580260428 ns/iter 0.99
JSON_String_Equal_Small_By_Perfect_Hash/10 2.1667706249999696 ns/iter 2.1686646874996995 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.712498818244004 ns/iter 14.857419989792081 ns/iter 0.99
JSON_String_Fast_Hash/10 4.026350141118766 ns/iter 4.032517596486461 ns/iter 1.00
JSON_String_Fast_Hash/100 4.019981301820737 ns/iter 4.034402596490082 ns/iter 1.00
JSON_String_Key_Hash/10 7.944438616071129 ns/iter 8.110984785218493 ns/iter 0.98
JSON_String_Key_Hash/100 4.025212053570775 ns/iter 4.057224560816199 ns/iter 0.99
JSON_Object_Defines_Miss_Same_Length 3.7278267790582555 ns/iter 3.72214595400563 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 4.958395000001019 ns/iter 4.960390000001098 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.4118537885496365 ns/iter 3.416660161588194 ns/iter 1.00
Pointer_Object_Traverse 49.05403985008869 ns/iter 48.772419642862786 ns/iter 1.01
Pointer_Object_Try_Traverse 67.69965401784665 ns/iter 69.18337500000656 ns/iter 0.98
Pointer_Push_Back_Pointer_To_Weak_Pointer 166.4371428571343 ns/iter 160.3148883928794 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/gcc)

Benchmark suite Current: f12546f Previous: e28f893 Ratio
Pointer_Object_Traverse 45.85748567448012 ns/iter 47.966370987572965 ns/iter 0.96
Pointer_Object_Try_Traverse 26.16126400502648 ns/iter 26.17060165792804 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 145.11836483615014 ns/iter 144.88216200174426 ns/iter 1.00
JSON_Array_Of_Objects_Unique 408.6148343651594 ns/iter 410.9171898007433 ns/iter 0.99
JSON_Parse_1 33370.744676797796 ns/iter 34047.29706063125 ns/iter 0.98
JSON_Fast_Hash_Helm_Chart_Lock 62.822961369364975 ns/iter 62.89294994544978 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 149.07234646114733 ns/iter 150.51231322146614 ns/iter 0.99
JSON_String_Equal/10 6.34409014021938 ns/iter 7.264767901404103 ns/iter 0.87
JSON_String_Equal/100 6.969130083704583 ns/iter 6.800901341639663 ns/iter 1.02
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9340157813612802 ns/iter 0.9375818996549536 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.292868367570197 ns/iter 14.28910119255205 ns/iter 1.00
JSON_String_Fast_Hash/10 0.9340557086692001 ns/iter 0.9321562094956499 ns/iter 1.00
JSON_String_Fast_Hash/100 0.9331520921596693 ns/iter 0.9332863195858945 ns/iter 1.00
JSON_String_Key_Hash/10 1.6751655788928896 ns/iter 1.671599173218828 ns/iter 1.00
JSON_String_Key_Hash/100 1.9857205481567086 ns/iter 1.9845028226664616 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 2.4903192095022795 ns/iter 2.486157670953898 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 2.5017037777265902 ns/iter 2.4907458460159573 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.1141337942854386 ns/iter 3.112120157125772 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 3.423010065790234 ns/iter 3.4244427452497725 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.4249135754062823 ns/iter 3.4187005252508875 ns/iter 1.00
Regex_Period_Asterisk 3.4202093845938157 ns/iter 3.4279240475096633 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 3.430240228979137 ns/iter 3.424572199515197 ns/iter 1.00
Regex_Period_Plus 3.7331586605900533 ns/iter 3.7558182302202185 ns/iter 0.99
Regex_Period 3.7337087997996568 ns/iter 3.7328588703635455 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 3.731158134997403 ns/iter 3.733981295423487 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 3.738413647218827 ns/iter 3.731448881399061 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 4.692318342707487 ns/iter 4.6392684397301585 ns/iter 1.01
Regex_Caret_Group_Period_Asterisk_Group_Dollar 4.66307372478613 ns/iter 3.419634334896125 ns/iter 1.36
Regex_Caret_X_Hyphen 13.137306472771844 ns/iter 7.151382368780549 ns/iter 1.84
Regex_Period_Md_Dollar 89.98311738142463 ns/iter 91.1781153937411 ns/iter 0.99
Regex_Caret_Slash_Period_Asterisk 7.150538654360822 ns/iter 6.867394567207047 ns/iter 1.04
Regex_Caret_Period_Range_Dollar 4.662452162747702 ns/iter 3.4204568795401147 ns/iter 1.36
Regex_Nested_Backtrack 818.6169114863161 ns/iter 825.1179046238823 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: f12546f Previous: e28f893 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.069276812951991 ns/iter 2.034302099948923 ns/iter 1.02
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.0673643537331587 ns/iter 2.124459959657962 ns/iter 0.97
Regex_Period_Asterisk 2.075580111986825 ns/iter 2.0250577060476593 ns/iter 1.02
Regex_Group_Period_Asterisk_Group 2.1294442983601503 ns/iter 2.07134521188725 ns/iter 1.03
Regex_Period_Plus 1.7651333057447032 ns/iter 1.730096810482325 ns/iter 1.02
Regex_Period 1.7241080544708005 ns/iter 1.6973449120869857 ns/iter 1.02
Regex_Caret_Period_Plus_Dollar 1.713468189754026 ns/iter 1.7378590871936612 ns/iter 0.99
Regex_Caret_Group_Period_Plus_Group_Dollar 1.8058812518500176 ns/iter 1.6698564980872528 ns/iter 1.08
Regex_Caret_Period_Asterisk_Dollar 2.1373621598638097 ns/iter 2.0999517379995263 ns/iter 1.02
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.0511140708185227 ns/iter 1.9893448941264114 ns/iter 1.03
Regex_Caret_X_Hyphen 6.82405980090375 ns/iter 6.412607779724618 ns/iter 1.06
Regex_Period_Md_Dollar 74.45104474631097 ns/iter 74.42339238019707 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 5.11471425589748 ns/iter 4.706970478359595 ns/iter 1.09
Regex_Caret_Period_Range_Dollar 2.1257136735624376 ns/iter 2.011972075704755 ns/iter 1.06
Regex_Nested_Backtrack 1118.814323590933 ns/iter 874.4100491267352 ns/iter 1.28
JSON_Array_Of_Objects_Unique 249.72678266849465 ns/iter 230.64632670747432 ns/iter 1.08
JSON_Parse_1 29408.676725596568 ns/iter 25065.065338690336 ns/iter 1.17
JSON_Fast_Hash_Helm_Chart_Lock 30.18383410756317 ns/iter 25.337942146301682 ns/iter 1.19
JSON_Equality_Helm_Chart_Lock 130.5815705534417 ns/iter 120.72139062262094 ns/iter 1.08
JSON_String_Equal/10 5.932408756357016 ns/iter 5.828346172557502 ns/iter 1.02
JSON_String_Equal/100 5.4916884992165675 ns/iter 5.625671195467835 ns/iter 0.98
JSON_String_Equal_Small_By_Perfect_Hash/10 0.8869369027378782 ns/iter 0.7856509678475777 ns/iter 1.13
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 4.080416878266948 ns/iter 3.960230225736012 ns/iter 1.03
JSON_String_Fast_Hash/10 2.1323736220362584 ns/iter 2.0473858060237666 ns/iter 1.04
JSON_String_Fast_Hash/100 2.3121405150836774 ns/iter 2.091434095311349 ns/iter 1.11
JSON_String_Key_Hash/10 1.6440486798848168 ns/iter 1.5216015327588186 ns/iter 1.08
JSON_String_Key_Hash/100 2.060915711857809 ns/iter 2.0920893538367453 ns/iter 0.99
JSON_Object_Defines_Miss_Same_Length 2.1679249779721204 ns/iter 1.8670390571860183 ns/iter 1.16
JSON_Object_Defines_Miss_Too_Small 2.63331181872426 ns/iter 2.0577791323917984 ns/iter 1.28
JSON_Object_Defines_Miss_Too_Large 2.320593302840159 ns/iter 2.0158793131264563 ns/iter 1.15
Pointer_Object_Traverse 76.13341822310231 ns/iter 60.77589153690678 ns/iter 1.25
Pointer_Object_Try_Traverse 49.77867908537285 ns/iter 40.51842025259443 ns/iter 1.23
Pointer_Push_Back_Pointer_To_Weak_Pointer 190.2195490170984 ns/iter 163.98463093689736 ns/iter 1.16

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

Please sign in to comment.