.NET 9: Array vs Dictionary lookup performance in C#
I wanted to revisit my old post about the performance of lookup operations in dictionaries and arrays to see how all the performance improvements in newer .NET versions affect old benchmarks. TL;DR: The benchmark shows that dictionary lookups are around 2 times faster in .NET 9 compared to Framework 4.8. This means there is now less sense to use arrays to speed up lookups in small collections.
This does not apply to Unity yet, though they promise CoreCLR integration, so it might become useful someday
https://gamedev.center/net-9-array-vs-dictionary-lookup-performance-in-c/
#performance #lookup
Post #2419
915
- 👍 6
- 🔥 1