Closed
Description
We allocate a lot of dictionaries across ASP.NET Core, which have a non-zero allocation cost to them. An interesting idea would be to see if we could use an array internally for smaller sizes.
We already do this today in Routing: https://github.com/dotnet/aspnetcore/blob/main/src/Http/Http.Abstractions/src/Routing/RouteValueDictionary.cs. I think we could probably use RouteValueDictionary (or a copy of it) in different places across the stack.