4 ms·
The reason for benchmark performance isn't related to the JIT only but rather of .NET being more "pragmatic" with memory slices(usable with stack allocs,mmap),
by whizzter 6y ago
The reason for benchmark performance isn't related to the JIT only but rather of .NET being more "pragmatic" with memory slices(usable with stack allocs,mmap), value types and in/out/ref passing. These little things together makes the .NET code run with far less GC pressure and more cache locality like C++ code without making the code non-idiomatic (Yes, A JVM system can be written like QuestDB to achieve similar perf but it won't be idiomatic Java code).
Then the Kestrel server + new ASP.NET Core runtimes takes advantage of it (for example the new JSON parsing API's are built to directly consume byte memory w/o sacrificing too much extensibility).