{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/15419","repository_url":"https://api.github.com/repos/dotnet/coreclr","labels_url":"https://api.github.com/repos/dotnet/coreclr/issues/15419/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/15419/comments","events_url":"https://api.github.com/repos/dotnet/coreclr/issues/15419/events","html_url":"https://github.com/dotnet/coreclr/pull/15419","id":280251957,"number":15419,"title":"Dictionary CQ","user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars1.githubusercontent.com/u/1142958?v=4","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"labels":[{"id":517090700,"url":"https://api.github.com/repos/dotnet/coreclr/labels/area-System.Collections","name":"area-System.Collections","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":70,"created_at":"2017-12-07T19:35:51Z","updated_at":"2018-03-11T20:28:50Z","closed_at":"2018-03-01T22:07:03Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/15419","html_url":"https://github.com/dotnet/coreclr/pull/15419","diff_url":"https://github.com/dotnet/coreclr/pull/15419.diff","patch_url":"https://github.com/dotnet/coreclr/pull/15419.patch"},"body":"Up to x 1.5 speed up for finding value types, x1.2 for finding object types\r\n\r\n* Improve Dictionary FindEntry CQ https://github.com/dotnet/coreclr/pull/15460\r\n* Improve Dictionary TryInsert CQ https://github.com/dotnet/coreclr/pull/15462\r\n* Use `EqualityComparer<TKey>.Default` (only from #15411)\r\n* 1-bases `_buckets` so the don't be set to `-1` on each resize\r\n\r\nAdds 5kB (0.16% of base) to `System.Private.CoreLib.ni.dll` https://github.com/dotnet/coreclr/pull/15419#issuecomment-353247960\r\n\r\nBefore\r\n```\r\n                                Method |\r\n-------------------------------------- |\r\n    ContainsKeySimplePositive_IntKey   | IEqualityComparer\r\n    ContainsKeySimpleNegative_IntKey   | IEqualityComparer\r\n ContainsKeySimplePositive_StringKey   | IEqualityComparer\r\n ContainsKeySimpleNegative_StringKey   | IEqualityComparer\r\n   ContainsKeySimplePositive_ObjectKey | IEqualityComparer\r\n   ContainsKeySimpleNegative_ObjectKey | IEqualityComparer\r\n```\r\nAfter\r\n```\r\n                                Method |\r\n-------------------------------------- |\r\n    ContainsKeySimplePositive_IntKey   | devirtualized\r\n    ContainsKeySimpleNegative_IntKey   | devirtualized\r\n ContainsKeySimplePositive_StringKey   | IEqualityComparer\r\n ContainsKeySimpleNegative_StringKey   | IEqualityComparer\r\n   ContainsKeySimplePositive_ObjectKey | virtual\r\n   ContainsKeySimpleNegative_ObjectKey | virtual\r\n```\r\n\r\n```\r\n                          Method |Items |       Current |   Single func | Change |\r\n-------------------------------- |----- |--------------:|--------------:|-------:|\r\n   ContainsKey_Single_Yes_IntKey | 1000 |     11.231 ns |      7.110 ns | x 1.58 |\r\n    ContainsKey_Single_No_IntKey | 1000 |     10.794 ns |      7.179 ns | x 1.50 |\r\n          ContainsKey_All_IntKey | 1000 | 10,815.405 ns |  7,220.128 ns | x 1.50 |\r\nContainsKey_Single_Yes_StringKey | 1000 |     20.489 ns |     19.925 ns | x 1.03 |\r\n ContainsKey_Single_No_StringKey | 1000 |     12.747 ns |     13.414 ns | x 0.95 |\r\nContainsKey_Single_Yes_ObjectKey | 1000 |     11.233 ns |      9.119 ns | x 1.23 |\r\n ContainsKey_Single_No_ObjectKey | 1000 |     11.192 ns |      8.560 ns | x 1.31 |\r\n                      Add_IntKey | 1000 | 27,573.689 ns | 22,503.652 ns | x 1.23 |\r\n                   Add_StringKey | 1000 | 76,095.748 ns | 77,253.701 ns | x 0.99 |\r\n                   Add_ObjectKey | 1000 | 68,845.402 ns | 67,529.550 ns | x 1.02 |\r\n              PreSizedAdd_IntKey | 1000 | 11,558.450 ns |  9,658.953 ns | x 1.20 |\r\n           PreSizedAdd_StringKey | 1000 | 57,360.936 ns | 57,710.254 ns | x 0.99 |\r\n           PreSizedAdd_ObjectKey | 1000 | 54,780.942 ns | 50,300.463 ns | x 1.09 |\r\n```\r\n\r\nPerformance-wise, multipath was faster but that increased code-gen by 27kB https://github.com/dotnet/coreclr/pull/15419#issuecomment-352159250\r\n\r\nResolves: https://github.com/dotnet/coreclr/issues/16258"},"comment":{"url":"https://api.github.com/repos/dotnet/coreclr/issues/comments/372146439","html_url":"https://github.com/dotnet/coreclr/pull/15419#issuecomment-372146439","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/15419","id":372146439,"user":{"login":"benaadams","id":1142958,"avatar_url":"https://avatars1.githubusercontent.com/u/1142958?v=4","gravatar_id":"","url":"https://api.github.com/users/benaadams","html_url":"https://github.com/benaadams","followers_url":"https://api.github.com/users/benaadams/followers","following_url":"https://api.github.com/users/benaadams/following{/other_user}","gists_url":"https://api.github.com/users/benaadams/gists{/gist_id}","starred_url":"https://api.github.com/users/benaadams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benaadams/subscriptions","organizations_url":"https://api.github.com/users/benaadams/orgs","repos_url":"https://api.github.com/users/benaadams/repos","events_url":"https://api.github.com/users/benaadams/events{/privacy}","received_events_url":"https://api.github.com/users/benaadams/received_events","type":"User","site_admin":false},"created_at":"2018-03-11T20:28:50Z","updated_at":"2018-03-11T20:28:50Z","author_association":"CONTRIBUTOR","body":"Good news!\r\n\r\nThe Benchmarks Game tests also I believe include Jit and startup time; was the extra cost from ArrayPoolEventSource in 2.0? https://github.com/dotnet/coreclr/issues/15954\r\n\r\nI assume so; and that has also gone."}}
{"actor":{"display_login":"benaadams"}}