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

Minor optimisations to LoopItemsPropertiesExactlyTypeStrictHash #338

Closed
wants to merge 1 commit into from

Conversation

jviotti
Copy link
Member

@jviotti jviotti commented Jan 17, 2025

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

@jviotti jviotti force-pushed the micro-optimisations branch from 5ca773f to 9a5f9d3 Compare January 17, 2025 20:00
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: 9a5f9d3 Previous: fa5e0a0 Ratio
Compiler_Draft6_AdaptiveCard 47739770125.00006 ns/iter 45482223542.000046 ns/iter 1.05
Compiler_2019_09_OMC_JSON_V2 7970192541.999949 ns/iter 7783523250.0000305 ns/iter 1.02
Evaluator_Draft4_Meta_1_No_Callback 169.3628425014076 ns/iter 167.45694757755976 ns/iter 1.01
Evaluator_Draft4_Required_Properties 442.26476028502145 ns/iter 436.4585818477184 ns/iter 1.01
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 19.837688437728982 ns/iter 21.57584364555067 ns/iter 0.92
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 9.50353985234793 ns/iter 9.268557365477589 ns/iter 1.03
Evaluator_Draft4_Items_Schema 271.7801313578818 ns/iter 262.0874048858149 ns/iter 1.04
Evaluator_Draft4_Nested_Object 3.38537625771432 ns/iter 3.1356294305212917 ns/iter 1.08
Evaluator_Draft4_Properties_Triad_Optional 755.145265667844 ns/iter 742.7202959014983 ns/iter 1.02
Evaluator_Draft4_Properties_Triad_Closed 615.6283275945127 ns/iter 603.7968241949101 ns/iter 1.02
Evaluator_Draft4_Properties_Triad_Required 752.0632043506891 ns/iter 756.7020982810294 ns/iter 0.99
Evaluator_Draft4_Properties_Closed 47.5375762978881 ns/iter 51.361466408576504 ns/iter 0.93
Evaluator_Draft4_Non_Recursive_Ref 9.547306941723434 ns/iter 9.446006476838726 ns/iter 1.01
Evaluator_Draft4_Pattern_Properties_True 163.87257953763617 ns/iter 161.2161534937234 ns/iter 1.02
Evaluator_Draft4_Ref_To_Single_Property 9.494621086730703 ns/iter 9.274386952650808 ns/iter 1.02
Evaluator_Draft4_Additional_Properties_Type 15.878931125122191 ns/iter 16.27654466691074 ns/iter 0.98
Evaluator_Draft4_Nested_Oneof 51.250262499991095 ns/iter 50.416831245645135 ns/iter 1.02
Evaluator_Draft4_Long_Enum 27.80379669340462 ns/iter 27.480916964271348 ns/iter 1.01
Evaluator_Draft4_Type_Object 5.3904065531776215 ns/iter 5.423618516610436 ns/iter 0.99
Evaluator_Draft6_Property_Names 87.50176462283534 ns/iter 86.04355899706573 ns/iter 1.02
Evaluator_Draft7_If_Then_Else 24.90112400585744 ns/iter 24.31088802643738 ns/iter 1.02
Evaluator_Draft7_Vercel_1 35885.30573471546 ns/iter 33275.67298115432 ns/iter 1.08
Evaluator_Draft7_Helm_Chart_Lock_1 180.586168768082 ns/iter 141.1030054172653 ns/iter 1.28
Evaluator_Draft7_Helm_Chart_Lock_2 195.61921748217802 ns/iter 207.72131676704907 ns/iter 0.94
Evaluator_Draft7_Jasmine_1 121.13234102341971 ns/iter 118.48299989738133 ns/iter 1.02
Evaluator_2019_09_Unevaluated_Properties 35.754619780996656 ns/iter 34.8139690916337 ns/iter 1.03
Evaluator_2019_09_OMC_JSON_V2_1 1113.664416000545 ns/iter 997.6448138174142 ns/iter 1.12
Evaluator_2020_12_Dynamic_Ref 403.9712944311113 ns/iter 368.68769233903726 ns/iter 1.10
Evaluator_2020_12_Dynamic_Ref_Single 6.018034718861155 ns/iter 5.415262524369021 ns/iter 1.11
Evaluator_2020_12_CQL_1 2596.8808612459143 ns/iter 2333.3088331199306 ns/iter 1.11
Evaluator_2020_12_OpenAPI 158586.04853044136 ns/iter 149024.52921109632 ns/iter 1.06

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/llvm)

Benchmark suite Current: 9a5f9d3 Previous: fa5e0a0 Ratio
Compiler_Draft6_AdaptiveCard 68647121042.00004 ns/iter 68594771085.000046 ns/iter 1.00
Compiler_2019_09_OMC_JSON_V2 11170319737 ns/iter 11121985144.999996 ns/iter 1.00
Evaluator_Draft4_Meta_1_No_Callback 242.6906885613729 ns/iter 241.6389390061592 ns/iter 1.00
Evaluator_Draft4_Required_Properties 610.9302236225586 ns/iter 595.2249648695097 ns/iter 1.03
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 28.713645112440613 ns/iter 28.655775935291413 ns/iter 1.00
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 16.546331829011763 ns/iter 16.49926780287597 ns/iter 1.00
Evaluator_Draft4_Items_Schema 627.1069204632093 ns/iter 598.0626663946576 ns/iter 1.05
Evaluator_Draft4_Nested_Object 4.676877702338272 ns/iter 4.662072398937934 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Optional 875.8363379613318 ns/iter 875.0908781971395 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Closed 700.3982809314979 ns/iter 713.7299030322202 ns/iter 0.98
Evaluator_Draft4_Properties_Triad_Required 906.0064642176173 ns/iter 904.4187262644259 ns/iter 1.00
Evaluator_Draft4_Properties_Closed 75.711655955222 ns/iter 76.0918231168134 ns/iter 1.00
Evaluator_Draft4_Non_Recursive_Ref 32.3479301873453 ns/iter 32.35195254855829 ns/iter 1.00
Evaluator_Draft4_Pattern_Properties_True 244.5185841880918 ns/iter 239.65667276501966 ns/iter 1.02
Evaluator_Draft4_Ref_To_Single_Property 16.492257384364034 ns/iter 16.491435523661988 ns/iter 1.00
Evaluator_Draft4_Additional_Properties_Type 61.69531316495729 ns/iter 61.55773915088362 ns/iter 1.00
Evaluator_Draft4_Nested_Oneof 87.6130419437078 ns/iter 87.73319083685203 ns/iter 1.00
Evaluator_Draft4_Long_Enum 19.01897170036535 ns/iter 19.30258917649175 ns/iter 0.99
Evaluator_Draft4_Type_Object 10.671461594424953 ns/iter 10.62691131262952 ns/iter 1.00
Evaluator_Draft6_Property_Names 127.49320945607445 ns/iter 127.3955437664288 ns/iter 1.00
Evaluator_Draft7_If_Then_Else 40.12798914332219 ns/iter 40.14850193142339 ns/iter 1.00
Evaluator_Draft7_Vercel_1 48343.11273227986 ns/iter 49637.44549295482 ns/iter 0.97
Evaluator_Draft7_Helm_Chart_Lock_1 351.3717582682097 ns/iter 296.21992991421047 ns/iter 1.19
Evaluator_Draft7_Helm_Chart_Lock_2 485.57680748764267 ns/iter 339.1400452544427 ns/iter 1.43
Evaluator_Draft7_Jasmine_1 168.2183594812368 ns/iter 168.74064736723656 ns/iter 1.00
Evaluator_2019_09_Unevaluated_Properties 54.36489076401758 ns/iter 52.58587924925898 ns/iter 1.03
Evaluator_2019_09_OMC_JSON_V2_1 1390.8600810967662 ns/iter 1341.9336696264836 ns/iter 1.04
Evaluator_2020_12_Dynamic_Ref 573.0100972049075 ns/iter 577.0403356319665 ns/iter 0.99
Evaluator_2020_12_Dynamic_Ref_Single 10.603149786075877 ns/iter 10.577710761852392 ns/iter 1.00
Evaluator_2020_12_CQL_1 4089.7914812933927 ns/iter 4068.129490970689 ns/iter 1.01
Evaluator_2020_12_OpenAPI 189896.3280706602 ns/iter 187329.8062118128 ns/iter 1.01

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 (macos/gcc)

Benchmark suite Current: 9a5f9d3 Previous: fa5e0a0 Ratio
Compiler_Draft6_AdaptiveCard 63821432113.64746 ns/iter 60234808683.395386 ns/iter 1.06
Compiler_2019_09_OMC_JSON_V2 8253650903.701782 ns/iter 8269497156.143188 ns/iter 1.00
Evaluator_Draft4_Meta_1_No_Callback 164.1358293883115 ns/iter 159.87196793293174 ns/iter 1.03
Evaluator_Draft4_Required_Properties 426.97929974333977 ns/iter 389.1576066858461 ns/iter 1.10
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 17.020954736647397 ns/iter 17.693142475342153 ns/iter 0.96
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 9.191392862025031 ns/iter 9.972586107708887 ns/iter 0.92
Evaluator_Draft4_Items_Schema 435.86150067985994 ns/iter 449.15133961482957 ns/iter 0.97
Evaluator_Draft4_Nested_Object 2.102282379234619 ns/iter 2.0991998207915645 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Optional 784.204726041481 ns/iter 790.7235923569197 ns/iter 0.99
Evaluator_Draft4_Properties_Triad_Closed 642.4300023587027 ns/iter 640.3145876266261 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Required 822.7604273823671 ns/iter 836.2947047326936 ns/iter 0.98
Evaluator_Draft4_Properties_Closed 66.21349973908653 ns/iter 66.98419679195786 ns/iter 0.99
Evaluator_Draft4_Non_Recursive_Ref 13.242660010071122 ns/iter 13.910163395080424 ns/iter 0.95
Evaluator_Draft4_Pattern_Properties_True 186.66889161464906 ns/iter 189.0117776576577 ns/iter 0.99
Evaluator_Draft4_Ref_To_Single_Property 9.782402129978404 ns/iter 9.871536570483284 ns/iter 0.99
Evaluator_Draft4_Additional_Properties_Type 24.301310205814453 ns/iter 24.639350057147706 ns/iter 0.99
Evaluator_Draft4_Nested_Oneof 55.93488793848963 ns/iter 55.551673692116196 ns/iter 1.01
Evaluator_Draft4_Long_Enum 8.63414929218726 ns/iter 8.865448887427007 ns/iter 0.97
Evaluator_Draft4_Type_Object 5.049318814746886 ns/iter 4.611534871375444 ns/iter 1.09
Evaluator_Draft6_Property_Names 114.91630338930138 ns/iter 111.7858634272686 ns/iter 1.03
Evaluator_Draft7_If_Then_Else 25.24019203722969 ns/iter 25.496330188970767 ns/iter 0.99
Evaluator_Draft7_Vercel_1 37293.53353723621 ns/iter 36874.42482197693 ns/iter 1.01
Evaluator_Draft7_Helm_Chart_Lock_1 235.0247661994722 ns/iter 195.21831093289694 ns/iter 1.20
Evaluator_Draft7_Helm_Chart_Lock_2 341.91203050697743 ns/iter 276.06972266813204 ns/iter 1.24
Evaluator_Draft7_Jasmine_1 123.15545058824867 ns/iter 123.30620024476949 ns/iter 1.00
Evaluator_2019_09_Unevaluated_Properties 33.80789601577142 ns/iter 35.76669014983856 ns/iter 0.95
Evaluator_2019_09_OMC_JSON_V2_1 1061.7278276015809 ns/iter 1000.9874093948741 ns/iter 1.06
Evaluator_2020_12_Dynamic_Ref 463.8614076938695 ns/iter 457.04847935638 ns/iter 1.01
Evaluator_2020_12_Dynamic_Ref_Single 4.8704818151342035 ns/iter 4.8280605547634545 ns/iter 1.01
Evaluator_2020_12_CQL_1 2645.162596420956 ns/iter 2704.7102986876353 ns/iter 0.98
Evaluator_2020_12_OpenAPI 161763.9103061867 ns/iter 172376.35946262875 ns/iter 0.94

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: 9a5f9d3 Previous: fa5e0a0 Ratio
Compiler_Draft6_AdaptiveCard 168532941400.00003 ns/iter 162373207500.0007 ns/iter 1.04
Compiler_2019_09_OMC_JSON_V2 24315695799.999958 ns/iter 23880355700.00011 ns/iter 1.02
Evaluator_Draft4_Meta_1_No_Callback 372.0938442689547 ns/iter 367.40789867682764 ns/iter 1.01
Evaluator_Draft4_Required_Properties 949.2982815632145 ns/iter 957.2778762141736 ns/iter 0.99
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 39.2066796874995 ns/iter 39.125111607164946 ns/iter 1.00
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 22.313471875001767 ns/iter 22.334787500000175 ns/iter 1.00
Evaluator_Draft4_Items_Schema 736.195758928534 ns/iter 733.4370535707941 ns/iter 1.00
Evaluator_Draft4_Nested_Object 5.896282142856535 ns/iter 5.899472000000969 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Optional 1567.3397321430218 ns/iter 1637.9843495653056 ns/iter 0.96
Evaluator_Draft4_Properties_Triad_Closed 1265.7192857143887 ns/iter 1322.7616071422485 ns/iter 0.96
Evaluator_Draft4_Properties_Triad_Required 1627.4096245023545 ns/iter 1693.9158746116939 ns/iter 0.96
Evaluator_Draft4_Properties_Closed 98.84099558745268 ns/iter 113.64153125001053 ns/iter 0.87
Evaluator_Draft4_Non_Recursive_Ref 35.947279893208254 ns/iter 35.841346411751566 ns/iter 1.00
Evaluator_Draft4_Pattern_Properties_True 231.48546523599927 ns/iter 231.4492710437511 ns/iter 1.00
Evaluator_Draft4_Ref_To_Single_Property 22.06807187500104 ns/iter 22.03398125001854 ns/iter 1.00
Evaluator_Draft4_Additional_Properties_Type 67.58407366071394 ns/iter 66.19005357143644 ns/iter 1.02
Evaluator_Draft4_Nested_Oneof 114.33639285714645 ns/iter 115.12951562494322 ns/iter 0.99
Evaluator_Draft4_Long_Enum 24.670953571432264 ns/iter 24.856421428564445 ns/iter 0.99
Evaluator_Draft4_Type_Object 14.09463074064824 ns/iter 13.916368464666476 ns/iter 1.01
Evaluator_Draft6_Property_Names 166.04328125000885 ns/iter 166.09539505118585 ns/iter 1.00
Evaluator_Draft7_If_Then_Else 59.54235714285565 ns/iter 61.769760465303264 ns/iter 0.96
Evaluator_Draft7_Vercel_1 75890.18973214019 ns/iter 78618.404017813 ns/iter 0.97
Evaluator_Draft7_Helm_Chart_Lock_1 344.46292509587585 ns/iter 334.46109913468086 ns/iter 1.03
Evaluator_Draft7_Helm_Chart_Lock_2 386.07224169319846 ns/iter 402.25921418487707 ns/iter 0.96
Evaluator_Draft7_Jasmine_1 255.73724824362915 ns/iter 237.77156944508445 ns/iter 1.08
Evaluator_2019_09_Unevaluated_Properties 63.547667410711135 ns/iter 63.03994642857041 ns/iter 1.01
Evaluator_2019_09_OMC_JSON_V2_1 1886.8844942907888 ns/iter 1924.3458253069116 ns/iter 0.98
Evaluator_2020_12_Dynamic_Ref 852.7907353612698 ns/iter 854.5855113446696 ns/iter 1.00
Evaluator_2020_12_Dynamic_Ref_Single 14.225966454349948 ns/iter 14.243592793543987 ns/iter 1.00
Evaluator_2020_12_CQL_1 4953.492999998161 ns/iter 5058.701999996629 ns/iter 0.98
Evaluator_2020_12_OpenAPI 290521.92536053737 ns/iter 300674.1730278286 ns/iter 0.97

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: 9a5f9d3 Previous: fa5e0a0 Ratio
Evaluator_2020_12_Dynamic_Ref 626.1911080190713 ns/iter 634.972293926689 ns/iter 0.99
Evaluator_2020_12_Dynamic_Ref_Single 9.110773558371166 ns/iter 9.44312461128595 ns/iter 0.96
Evaluator_2020_12_CQL_1 4134.439700307549 ns/iter 4172.316356112814 ns/iter 0.99
Evaluator_2020_12_OpenAPI 220379.02712079385 ns/iter 223533.8125994457 ns/iter 0.99
Evaluator_2019_09_Unevaluated_Properties 52.071273367424745 ns/iter 52.1690932555161 ns/iter 1.00
Evaluator_2019_09_OMC_JSON_V2_1 1348.80141249953 ns/iter 1361.2549873217404 ns/iter 0.99
Evaluator_Draft7_If_Then_Else 42.689166251854424 ns/iter 43.824036489465755 ns/iter 0.97
Evaluator_Draft7_Vercel_1 46493.87824879498 ns/iter 45395.976055691914 ns/iter 1.02
Evaluator_Draft7_Helm_Chart_Lock_1 238.2306556080054 ns/iter 208.91478503747527 ns/iter 1.14
Evaluator_Draft7_Helm_Chart_Lock_2 295.4480713189292 ns/iter 264.31826935333316 ns/iter 1.12
Evaluator_Draft7_Jasmine_1 151.7770843567242 ns/iter 146.93029770498893 ns/iter 1.03
Evaluator_Draft6_Property_Names 154.0450274986501 ns/iter 140.3619531868239 ns/iter 1.10
Evaluator_Draft4_Meta_1_No_Callback 229.56902879059137 ns/iter 233.18131089799965 ns/iter 0.98
Evaluator_Draft4_Required_Properties 456.6110873977285 ns/iter 438.7495907349711 ns/iter 1.04
Evaluator_Draft4_Many_Optional_Properties_Minimal_Match 25.83921723805868 ns/iter 25.69659319715838 ns/iter 1.01
Evaluator_Draft4_Few_Optional_Properties_Minimal_Match 11.896076668499658 ns/iter 11.897535284091994 ns/iter 1.00
Evaluator_Draft4_Items_Schema 485.1542253121511 ns/iter 476.8444018935655 ns/iter 1.02
Evaluator_Draft4_Nested_Object 5.398176240806024 ns/iter 3.880624337660631 ns/iter 1.39
Evaluator_Draft4_Properties_Triad_Optional 1032.5241849598024 ns/iter 1037.4554949895758 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Closed 820.5673689154543 ns/iter 819.3983895268727 ns/iter 1.00
Evaluator_Draft4_Properties_Triad_Required 1038.791145403481 ns/iter 1073.2034159543766 ns/iter 0.97
Evaluator_Draft4_Properties_Closed 73.41681420830847 ns/iter 71.91908820042238 ns/iter 1.02
Evaluator_Draft4_Non_Recursive_Ref 12.306077303668884 ns/iter 12.566504229358204 ns/iter 0.98
Evaluator_Draft4_Pattern_Properties_True 253.00662038921206 ns/iter 238.52949596406864 ns/iter 1.06
Evaluator_Draft4_Ref_To_Single_Property 11.978356122332066 ns/iter 11.948078755985586 ns/iter 1.00
Evaluator_Draft4_Additional_Properties_Type 15.035998053774021 ns/iter 15.33070779424 ns/iter 0.98
Evaluator_Draft4_Nested_Oneof 107.0537344351587 ns/iter 109.03761842861375 ns/iter 0.98
Evaluator_Draft4_Long_Enum 19.25788504026338 ns/iter 18.459079957542734 ns/iter 1.04
Evaluator_Draft4_Type_Object 9.111340882338446 ns/iter 9.41593735387774 ns/iter 0.97
Compiler_2019_09_OMC_JSON_V2 10536897842.00003 ns/iter 10569517981.999979 ns/iter 1.00
Compiler_Draft6_AdaptiveCard 68260360452.99998 ns/iter 67861065777.9999 ns/iter 1.01

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

@jviotti jviotti closed this Jan 17, 2025
@jviotti jviotti deleted the micro-optimisations branch January 17, 2025 20:25
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