Steven Giesel 2/27/2023

Performance (ReadOnly)List vs Immutable collection types

Read Original

This technical article analyzes the performance differences between various C# collection types, including List<T>, ReadOnlyCollection<T>, ImmutableArray<T>, and ImmutableList<T>. It presents benchmark results for iterating over these collections, explaining the underlying reasons for the observed performance characteristics, such as indirection costs and internal data structures.

Performance (ReadOnly)List vs Immutable collection types

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser