James Turner

Results 197 comments of James Turner
trafficstars

### Strings vs Tuple Benchmark: Reading ```csharp [SimpleJob(RuntimeMoniker.NetCoreApp50), MemoryDiagnoser] public class TestBenchmark { private Dictionary DataA {get;set;} = new(); private Dictionary DataB {get;set;} = new(); private string BaseString; private int...

### String vs Tuple Benchmark: Lookup Only ```csharp [SimpleJob(RuntimeMoniker.NetCoreApp50), MemoryDiagnoser] public class TestBenchmark { private Dictionary DataA {get;set;} = new(); private Dictionary DataB {get;set;} = new(); private string BaseString; private...

So the lookup itself is quite a bit slower in the test vs strings however that time is counteracted by the saving of creating the string vs creating the tuple.

I did discover one interesting thing - if I make the second dictionary use key of `object`, it performs the same as `ITuple`. This means I'm right in that the...

As an aside to this, potentially establishing an Least Recently Used (LRU) eviction strategy. While I can't measure the memory used in the cache (I don't serialize it, I just...

Just found out about using source generators to make efficient log messages: https://andrewlock.net/exploring-dotnet-6-part-8-improving-logging-performance-with-source-generators/ If I can do that with the .NET 6 SDK but still target older frameworks, I think...

Firstly, this is pretty awesome! I've had a quick look now and there are a lot of things I like and a few things to consider. The biggest thing for...

> As a consumer of the library I would take a performance hit in order to have detailed statistics - but if I needed raw performance, I would also have...

So it took a little longer to get back to you but here is my thoughts... I think it could still be as an extension but it requires a core...

> > In the end, all of this would mean that a CacheStack (potentially ICacheStack too) would expose a variety of events that extensions and everything else can hook into....