by nu11ptr · 3y ago · 0 comments
I'd say, if C++ performance is not essential, Java might actually be a good choice. It's very fast and GC issues could be worked around.
I will agree on the other points, however, but I wonder how much of a gain that is against the pain of working against the language. Hard to say.
You can still write a safe/minimal wrapper around that with just the actual API you need. (Instead of allowing everything to just peek/poke around in arbitrary off-heap memory.)
Although - I have known a trading firm that wrote their platform in Java, offloading any disk and network access to some limited C++ and JNI. In their case I believe they simply allocated large buffers that C++ pushed and pulled data from. The benefit of this strategy was their Quants could build memory-safe strategies and in a much friendlier language. For them if eliminated the risk of bad code and lost time to debugging awful C++ errors.
To my knowledge it all worked for them quite well, they made good money and any minor differences of speed in Java were negligible to them.