A microbenchmark on the new message context store in JustSaying. The last one, ReadWriteNewMessageContext
is probably the most realistic.
So we have an overhead of around 50 nanoseconds (5×10-5 ms). This is good. And I suggest that we don't bother with ways to opt in or out of this, just have it on all the time, regardless of if it is used by handlers or not.
// * Summary *
BenchmarkDotNet=v0.11.3, OS=Windows 10.0.17134.112 (1803/April2018Update/Redstone4)
Intel Core i7-8750H CPU 2.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=2.2.101