Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't apply additionalProperties type optimization in exhaustive mode #1279

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

jviotti
Copy link
Member

@jviotti jviotti commented Oct 10, 2024

Signed-off-by: Juan Cruz Viotti [email protected]

Copy link

@github-actions github-actions bot left a comment

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: d434dd9 Previous: fc93df7 Ratio
JSON_Array_Of_Objects_Unique 4022.5662848489956 ns/iter 3539.179085406428 ns/iter 1.14
JSONSchema_Validate_Draft4_Meta_1_No_Callback 800.1359128158613 ns/iter 739.1293202761764 ns/iter 1.08
JSONSchema_Validate_Draft4_Required_Properties 980.8886713493125 ns/iter 937.0832300764722 ns/iter 1.05
JSONSchema_Validate_Draft4_Many_Optional_Properties_Minimal_Match 156.72366965134765 ns/iter 151.4340338328654 ns/iter 1.03
JSONSchema_Validate_Draft4_Few_Optional_Properties_Minimal_Match 109.34386196172613 ns/iter 104.63587497031037 ns/iter 1.04
JSONSchema_Validate_Draft4_Items_Schema 2690.0062275072073 ns/iter 2641.6021858931176 ns/iter 1.02
JSONSchema_Validate_Draft4_Nested_Object 23.22260551330837 ns/iter 22.99128429116757 ns/iter 1.01
JSONSchema_Validate_Draft4_Properties_Triad_Optional 1290.0937425508628 ns/iter 1254.7051918008842 ns/iter 1.03
JSONSchema_Validate_Draft4_Properties_Triad_Closed 962.9747835421092 ns/iter 959.2408046318733 ns/iter 1.00
JSONSchema_Validate_Draft4_Properties_Triad_Required 1307.6033432470715 ns/iter 1302.0293141170928 ns/iter 1.00
JSONSchema_Validate_Draft4_Non_Recursive_Ref 213.48398597813807 ns/iter 213.08314720042492 ns/iter 1.00
JSONSchema_Validate_Draft4_Pattern_Properties_True 1367.8709912681682 ns/iter 1333.1403319427945 ns/iter 1.03
JSONSchema_Validate_Draft4_Ref_To_Single_Property 106.45467992288285 ns/iter 105.23816043919281 ns/iter 1.01
JSONSchema_Validate_Draft4_Additional_Properties_Type 432.57482808237916 ns/iter 406.48224309233063 ns/iter 1.06
JSONSchema_Validate_Draft4_Nested_Oneof 387.2132892683522 ns/iter 368.94203231720104 ns/iter 1.05
JSONSchema_Validate_Draft6_Property_Names 829.7971115238756 ns/iter 787.2748635395394 ns/iter 1.05
JSONSchema_Validate_Draft7_If_Then_Else 179.26990744801904 ns/iter 168.9486897187057 ns/iter 1.06
JSONSchema_Compiler_Draft6_AdaptiveCard 3069572666.999875 ns/iter 2917366915.999992 ns/iter 1.05

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

Copy link

@github-actions github-actions bot left a comment

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: d434dd9 Previous: fc93df7 Ratio
JSONSchema_Compiler_Draft6_AdaptiveCard 6082413341.000006 ns/iter 6078907442.000059 ns/iter 1.00
JSONSchema_Validate_Draft4_Meta_1_No_Callback 1031.7015477542934 ns/iter 1176.5387222903798 ns/iter 0.88
JSONSchema_Validate_Draft4_Required_Properties 2243.5919254090604 ns/iter 2376.1476746842177 ns/iter 0.94
JSONSchema_Validate_Draft4_Many_Optional_Properties_Minimal_Match 190.26076944115255 ns/iter 216.21575393346416 ns/iter 0.88
JSONSchema_Validate_Draft4_Few_Optional_Properties_Minimal_Match 133.01194225933887 ns/iter 149.34858950665554 ns/iter 0.89
JSONSchema_Validate_Draft4_Items_Schema 3051.034236382357 ns/iter 3136.8445879961682 ns/iter 0.97
JSONSchema_Validate_Draft4_Nested_Object 22.72983577348662 ns/iter 22.688024927282775 ns/iter 1.00
JSONSchema_Validate_Draft4_Properties_Triad_Optional 1751.5852945885536 ns/iter 1764.0356296205928 ns/iter 0.99
JSONSchema_Validate_Draft4_Properties_Triad_Closed 1425.7083485213645 ns/iter 1451.7441188003759 ns/iter 0.98
JSONSchema_Validate_Draft4_Properties_Triad_Required 1829.585533691062 ns/iter 1854.3389302576456 ns/iter 0.99
JSONSchema_Validate_Draft4_Non_Recursive_Ref 455.28078555612086 ns/iter 474.0714184054892 ns/iter 0.96
JSONSchema_Validate_Draft4_Pattern_Properties_True 2319.5131090239547 ns/iter 2402.929597893401 ns/iter 0.97
JSONSchema_Validate_Draft4_Ref_To_Single_Property 137.78676119841924 ns/iter 154.83252595125845 ns/iter 0.89
JSONSchema_Validate_Draft4_Additional_Properties_Type 1069.3159290553256 ns/iter 1128.518250554197 ns/iter 0.95
JSONSchema_Validate_Draft4_Nested_Oneof 420.40104053795574 ns/iter 484.14675924996465 ns/iter 0.87
JSONSchema_Validate_Draft6_Property_Names 1565.9650460705232 ns/iter 1795.7525184486178 ns/iter 0.87
JSONSchema_Validate_Draft7_If_Then_Else 190.8654832866815 ns/iter 232.41252420015383 ns/iter 0.82
JSON_Array_Of_Objects_Unique 3317.7683761394505 ns/iter 3236.927592450315 ns/iter 1.02

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

Copy link

@github-actions github-actions bot left a comment

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: d434dd9 Previous: fc93df7 Ratio
JSON_Array_Of_Objects_Unique 5051.47500000021 ns/iter 5022.624999999152 ns/iter 1.01
JSONSchema_Validate_Draft4_Meta_1_No_Callback 2409.561484864174 ns/iter 2380.021897296913 ns/iter 1.01
JSONSchema_Validate_Draft4_Required_Properties 2022.3269445613573 ns/iter 2037.6727652602651 ns/iter 0.99
JSONSchema_Validate_Draft4_Many_Optional_Properties_Minimal_Match 560.231000000158 ns/iter 567.3317999999199 ns/iter 0.99
JSONSchema_Validate_Draft4_Few_Optional_Properties_Minimal_Match 414.3703386442912 ns/iter 411.5054370655274 ns/iter 1.01
JSONSchema_Validate_Draft4_Items_Schema 6528.59464285679 ns/iter 6364.809821428301 ns/iter 1.03
JSONSchema_Validate_Draft4_Nested_Object 161.59573660716424 ns/iter 162.18504464288026 ns/iter 1.00
JSONSchema_Validate_Draft4_Properties_Triad_Optional 5515.261607143884 ns/iter 5447.4789999994755 ns/iter 1.01
JSONSchema_Validate_Draft4_Properties_Triad_Closed 4482.963125001049 ns/iter 4486.87410714399 ns/iter 1.00
JSONSchema_Validate_Draft4_Properties_Triad_Required 5549.862000000303 ns/iter 5539.311607143255 ns/iter 1.00
JSONSchema_Validate_Draft4_Non_Recursive_Ref 542.2799999998915 ns/iter 539.8354464286318 ns/iter 1.00
JSONSchema_Validate_Draft4_Pattern_Properties_True 8100.9966517850025 ns/iter 8093.867438092267 ns/iter 1.00
JSONSchema_Validate_Draft4_Ref_To_Single_Property 416.15956279282375 ns/iter 415.30372699537253 ns/iter 1.00
JSONSchema_Validate_Draft4_Additional_Properties_Type 737.7079241072591 ns/iter 746.8366071429041 ns/iter 0.99
JSONSchema_Validate_Draft4_Nested_Oneof 1119.9350000002335 ns/iter 1118.1785714285297 ns/iter 1.00
JSONSchema_Validate_Draft6_Property_Names 1854.6412987871197 ns/iter 1846.1148626028908 ns/iter 1.00
JSONSchema_Validate_Draft7_If_Then_Else 555.8624107144234 ns/iter 564.399000000094 ns/iter 0.98
JSONSchema_Compiler_Draft6_AdaptiveCard 10370625799.999971 ns/iter 10144675799.99996 ns/iter 1.02

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

@jviotti jviotti force-pushed the additional-properties-type-exhaustive branch from 48064f5 to d434dd9 Compare October 10, 2024 21:01
Copy link

@github-actions github-actions bot left a comment

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: d434dd9 Previous: fc93df7 Ratio
JSON_Array_Of_Objects_Unique 2174.6525389756916 ns/iter 2169.7165764555325 ns/iter 1.00
JSONSchema_Validate_Draft4_Meta_1_No_Callback 1000.9163703095668 ns/iter 981.7494394887298 ns/iter 1.02
JSONSchema_Validate_Draft4_Required_Properties 1590.8359078965848 ns/iter 1592.5544237793943 ns/iter 1.00
JSONSchema_Validate_Draft4_Many_Optional_Properties_Minimal_Match 180.3757899092297 ns/iter 180.02485957474525 ns/iter 1.00
JSONSchema_Validate_Draft4_Few_Optional_Properties_Minimal_Match 129.02004749351127 ns/iter 130.51063187652954 ns/iter 0.99
JSONSchema_Validate_Draft4_Items_Schema 3540.347069624828 ns/iter 3520.438592379231 ns/iter 1.01
JSONSchema_Validate_Draft4_Nested_Object 32.537926441789125 ns/iter 33.54106243272831 ns/iter 0.97
JSONSchema_Validate_Draft4_Properties_Triad_Optional 1809.0684486629846 ns/iter 1799.7635709252675 ns/iter 1.01
JSONSchema_Validate_Draft4_Properties_Triad_Closed 1509.3169269775449 ns/iter 1497.271063932209 ns/iter 1.01
JSONSchema_Validate_Draft4_Properties_Triad_Required 1894.4859298011079 ns/iter 1882.726012012194 ns/iter 1.01
JSONSchema_Validate_Draft4_Non_Recursive_Ref 482.2416666781491 ns/iter 482.31024682220965 ns/iter 1.00
JSONSchema_Validate_Draft4_Pattern_Properties_True 2431.6837445292863 ns/iter 2523.1219769292215 ns/iter 0.96
JSONSchema_Validate_Draft4_Ref_To_Single_Property 132.49888069624902 ns/iter 133.6719767972648 ns/iter 0.99
JSONSchema_Validate_Draft4_Additional_Properties_Type 605.7791361783757 ns/iter 600.2479797521946 ns/iter 1.01
JSONSchema_Validate_Draft4_Nested_Oneof 475.29251852641636 ns/iter 472.1355217474952 ns/iter 1.01
JSONSchema_Validate_Draft6_Property_Names 1247.4700210176793 ns/iter 1242.3396573498328 ns/iter 1.00
JSONSchema_Validate_Draft7_If_Then_Else 209.46736690848923 ns/iter 209.8878774342789 ns/iter 1.00
JSONSchema_Compiler_Draft6_AdaptiveCard 5589827663.999927 ns/iter 5507881609.000037 ns/iter 1.01

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

@jviotti jviotti merged commit 37aff6f into main Oct 10, 2024
13 checks passed
@jviotti jviotti deleted the additional-properties-type-exhaustive branch October 10, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant