aspnet / Routing

[Archived] Middleware for routing requests to application logic. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
272 stars 122 forks source link

Minor performance improvements for RouteValueDictionary #898

Closed drieseng closed 5 years ago

drieseng commented 5 years ago

Benchmarks:

Method Version Mean Error StdDev Op/s Gen 0 Allocated
ContainsKey_Properties_Found release/2.2 49.79 ns 0.2453 ns 0.1915 ns 20,085,908.7 - 0 B
ContainsKey_Properties_Found PR 39.03 ns 1.7731 ns 1.9708 ns 25,623,247.9 - 0 B
ContainsKey_Properties_NotFound release/2.2 35.19 ns 0.1114 ns 0.0663 ns 28,415,384.2 - 0 B
ContainsKey_Properties_NotFound PR 31.73 ns 0.0754 ns 0.0589 ns 31,514,773.8 - 0 B
TryAdd_Properties_AtCapacity_KeyExists release/2.2 218.22 ns 2.2617 ns 2.1156 ns 4,582,526.4 0.0024 208 B
TryAdd_Properties_AtCapacity_KeyExists PR 150.07 ns 1.8355 ns 1.7169 ns 6,663,347.2 0.0014 120 B
TryAdd_Properties_AtCapacity_KeyDoesNotExist release/2.2 151.90 ns 1.2008 ns 1.0645 ns 6,583,092.7 0.0012 120 B
TryAdd_Properties_AtCapacity_KeyDoesNotExist PR 144.29 ns 2.0227 ns 1.8920 ns 6,930,577.9 0.0014 120 B
TryAdd_Properties_NotAtCapacity_KeyExists release/2.2 200.75 ns 2.1600 ns 2.0204 ns 4,981,297.3 0.0021 200 B
TryAdd_Properties_NotAtCapacity_KeyExists PR 145.98 ns 2.4794 ns 2.3192 ns 6,850,315.0 0.0010 112 B