Re:Why Is C Faster Than Java (2009)
by jcranberry on Tuesday December 28, 2021 @02:43PM
(#29717155)
You definitely don't need an infinite amount of time to make C or C++ implementation of a matching engine run faster than a Java based one.
I've worked at two fintech companies, a prop shop and an investment bank and seen some APIs for other companies' matching engines and they've pretty much all been C/C++.
In my experience, C#/.NET is in a really interesting position when it comes to these questions. It does support value types out of the box which can add another order of magnitude over Java implementations of the same code. One example of this is the LMAX Disruptor. This was originally written for Java and then ported to C#. Because C# supports value types, a special ValueDisruptor variant was developed specific to its port, which enables performance that would otherwise be impossible in the Java solution (which is constrained to using reference types in the buffer).
https://medium.com/@ocoanet/improving-net-disruptor-performa...