ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mich...@griggs.org.uk
Subject .NET: Iterating collections via interfaces can impact peformance
Date Wed, 30 Aug 2017 07:41:48 GMT

Dear Igniters,

Whilst checking out BenchmarkDotNet (thanks Pavel!) I came across this
issue [1].  There is some useful discussion in [2] under "Dictionary
vs IDictionary". 

It seems that iterating collections via their interfaces has
performance implications, specifically that iterating interfaces can
cause unnecessary memory allocations and therefore GC, and the
MoveNext and Current functions being accessed by virtual interface
calls, rather than inlineable non-virtual calls.

As there are a number of instances of iterating collections via
interface in the Ignite.NET codebase, some of them in performance
critical areas like the Binary marshaller, perhaps we should
investigate changing those iterations to use the concrete types?


[1] https://github.com/dotnet/coreclr/issues/1579

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message