News for hackers. Stuff that matters.
Re:Java is better than C++ for high speed trading systems by DC-3 on Thursday November 26, 2020 @02:33PM (#25222912)
So Java is nearly as low-latency as C if you're willing to write your Java as if it were C?
Re:Java is better than C++ for high speed trading systems by lmilcin on Thursday November 26, 2020 @02:45PM (#25222991)
It can be done. It is just not very practical, you are better off writing C.

The only situation I can think of where Java would be right fit is where you have an application with a lot of logic and just a small part that needs to be highly optimized.

Re:Java is better than C++ for high speed trading systems by peter_lawrey on Monday November 30, 2020 @06:12AM (#25252634)
Most trading systems I work on only need a very small portion to be highly optimised. As long as most of the code is pretty efficient that is fine.
Re:Java is better than C++ for high speed trading systems by kgwgk on Friday November 27, 2020 @03:51AM (#25226709)
Real programmers can write FORTRAN in any language.
Re:Java is better than C++ for high speed trading systems by iphorde on Thursday November 26, 2020 @03:56PM (#25223468)
No. Java is not low-latency by any stretch. Java advocates would like to think it is, until a Bank, like BoA spends $8 million on Java in 2014, just to have it fail compliance testing. Entire project was scrapped.
Re:Java is better than C++ for high speed trading systems by pjmlp on Thursday November 26, 2020 @05:03PM (#25223835)
Re:Java is better than C++ for high speed trading systems by iphorde on Friday November 27, 2020 @12:05AM (#25225683)
250ms is not real-time, nor high frequency.
Re:Java is better than C++ for high speed trading systems by lmilcin on Friday November 27, 2020 @06:50AM (#25227876)
Please, get informed on what real-time is before you comment (in general it is good idea to understand a concept before you place confident comments like yours).

https://en.wikipedia.org/wiki/Real-time_computing

Real-time has nothing to do with performance and everything to do with predictability and deadlines.

People are put off when they find out that real time versions of Java or Linux are actually slower than the regular ones. Until you think about it a little bit and if they were faster there would not be multiple versions.

Real-time versions of products are created because sometimes performance is achieved by means of stochastic processes or amortizing costs and you need to remove these optimizations to be able to support deadlines.

Real-time programming emphasizes ability to calculate how long an operation will take as more valuable than raw performance.

Re:Java is better than C++ for high speed trading systems by sam_bristow on Friday November 27, 2020 @03:35AM (#25226620)
250ms could easily be real time in the context of a given system.

Real time doesn't (necessarily) mean fast, it means the latency is bounded.

Re:Java is better than C++ for high speed trading systems by pjmlp on Friday November 27, 2020 @01:37AM (#25226061)
It might not be high frequency, but it certainly is real-time, unless you are implying that the agencies that give this kind of government certifications are all a bunch of fools.
Re:Java is better than C++ for high speed trading systems by eru on Friday November 27, 2020 @02:50AM (#25226403)
Doesn't real time just mean that you can guarantee to react within certain time limits? In principle, those time limits could be hours or days..
Re:Java is better than C++ for high speed trading systems by pjmlp on Friday November 27, 2020 @05:33AM (#25227398)
Yes, but those limits are part of certification processes like those done by companies like https://www.highintegritysystems.com.

Usually playing with numbers in these kind of deployments isn't part of the package.

Re:Java is better than C++ for high speed trading systems by peter_lawrey on Monday November 30, 2020 @06:16AM (#25252660)
The trading systems we work on have a wire-to-wire latency of 20 - 50 microseconds on the 99.9%ile. It really depends on what you are looking to achieve.
Re:Java is better than C++ for high speed trading systems by the_arun on Thursday November 26, 2020 @07:37PM (#25224595)
I think this may not due to programming language, but beyond that.
Re:Java is better than C++ for high speed trading systems by ByteJockey on Thursday November 26, 2020 @02:40PM (#25222949)
You're really just paying for the jvm overhead at that point. 20-30% seems in the right ballpark.