![]() The (real) differences between Java and C++ Well, C++ might be “low latency” when it comes to executing code, but it’s definitely not low latency when it comes to rolling out new features or even finding devs who can write it. These systems are becoming standard, even for Tier 1 investment banks, despite the fact that they are (supposedly) slower. And I mean written in Java-not written in Java and then interpreted into C++ in pursuit of lower latency. The reality is that, nowadays, plenty of large banks and brokers use systems that are written in Java. In low-latency situations, such as high speed trading, where microseconds can make the difference between a viable piece of software and an obsolete waste of disk space, C++ is regarded as the gold standard. Since C++ is far closer to the metal, most developers will tell you, there is an inherent speed advantage to coding in the language. Let’s start by going looking at the reasons why you should prefer C++ for building high speed, low latency systems. ![]() It all comes down to your definition of “low latency.” Let me explain… The received wisdom And the truth is that latency can be a tricky thing to measure. It’s just that it’s easier to discuss this in relation to an area of development where I have experience. However, the arguments I make here can be applied to almost any circumstance in which low latency is required or desired. In this article, I want to take a particular example of software for which low latency is prized trading systems. But I’m here to convince you of the opposite, counter-intuitive, almost heretical notion: that when it comes to achieving low latency in software systems, Java is better. The received wisdom is that you would be crazy to use anything but C++ because anything else has too high a latency. There is an analogous situation when it comes to developing low latency software systems. The latter approach would, eventually, save me a lot of time writing articles-it could generate thousands per second-but my editor is unlikely to be happy to hear that the first article is going to take me two years. I could start training AI to write it for me. I could, for instance, continue to write this article on why you should use Java rather than C++ for low latency systems. As developers, we all know there are two ways of doing things: the manual, slow, annoying, complicated way, and the automated, fast, and even more complicated way.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |