DEV Community

Discussion on: The newly announced future of .NET - unifying all the things

Collapse
 
kspeakman profile image
Kasey Speakman • Edited

Will C# and .NET ever be fast enough to, say, implement a low-level binary database protocol, implement a neural network, or load/save/resize a JPEG image?

Sure it is*, but a bigger question is: does compiled C# application perf block your dev work?

* Examples written in C#

RavenDB

... RavenDB can perform over 150,000 writes per second and 1 million reads on simple commodity hardware.

Another press release I found says that this is specifically single node performance.

EventStore

Whilst performance depends on configuration and use patterns, we’ve benchmarked Event Store at around 15,000 writes per second and 50,000 reads per second!

Pretty sure this was benchmarked on a laptop at a demo I watched, not a server with high perf SSDs.

Techempower Benchmarks - Notice aspcore

ML.NET - machine learning

Also realize that the JIT is capable of squeezing out extra perf, because it will further optimize heavily used methods at runtime. Whereas AOT doesn't have as much information to know which pieces of code should get deep optimization. So, .NET code should get pretty close to C/C++ after warmup, and perhaps faster in long running services. .NET 5 will include AOT compilation option if you want to get faster startup instead of faster long-term perf -- such as in functions-as-a-service.

In any case, use F# instead of C#. 😀 (if you want)