Live data from Hacker News

Java is better than C++ for high speed trading systems

news.efinancialcareers.com

241–250 of 483 posts

Re: Java is better than C++ for high speed trading systems

#242

Has anyone used Golang for high speed trading? It seems like it hits all the sweet spots, yet it doesn't seem to be used that way. Does anyone know why?

Discord has an interesting engineering blog post on moving from Go to Rust due to performance issues causes by the Go GC.

https://link.medium.com/ZS6jwQCkJbb

Re: Java is better than C++ for high speed trading systems

#243

Hearing them describe this "C-like Java", I'm surprised C# wasn't a better fit given that it has value-type "structs" that don't have to sit behind a reference on the heap. As far as I know, Java still doesn't have an equivalent feature. Maybe the JVM's GC is just so much faster that it's worth it?

.NET was slower than the JVM before .NET Core but nowadays it's faster.

> .NET was slower than the JVM before .NET Core but nowadays it's faster.

Nope .NET is still slower than molasses in comparison to most JVM implementations.

Re: Java is better than C++ for high speed trading systems

#244
post #86
post #61

C++ is a fantastic language but it somehow attracts people with big ego. The smartest people I know would always try to simplify things, but many C++ developers (especially in financial industry) have this preference for complexity I can't explain. And C++ is the worst language to get clever with.

it's not hard to see why C++ would attract people who revel in complexity, there's like 7 ways to initialize a variable, and they're all slightly different in certain contexts

And to make things even more interesting, the rules change in subtle ways depending on the version of the language.

https://stackoverflow.com/a/620402/

Re: Java is better than C++ for high speed trading systems

#245
post #214

Earlier quoted context omitted.

Yes, but not because software engineers are worse human beings than civil engineers, which is all too often the undertone of these discussions. Rather, because software engineering hasn't killed enough people to advance; or when it has, it wasn't obviously the culprit. In which fields of software engineering do we find actual solid procedures and standards? Avionics. Medical hardware. Fields where the link between bu…

> software engineering hasn't killed enough people to advance and where it had, you get pretty serious control and certification process put in place to avoid it (Boeing notwithstanding)

The 737 Max issues were not with the software.

Re: Java is better than C++ for high speed trading systems

#246
post #5

When you write Java in a C like syntax : "Chronicle's system is built in what Lawrey describes as "C-like Java" and it's this that he encourages people to code low latency systems in." I guess very limited number of constructors, and most of all the methods are static. And they still struggle to find programmers that can code that way.

> When you write Java in a C like syntax And C is faster still when you write it with Fortran like (column order, and "restrict" mostly) semantics. An old mentor said to me 30 years ago that "A good programmer writes FORTRAN no matter what language they are using" (he was referring to speed of execution in the context of "good"). It seemed super funny at the time, but there's a lot of truth in that.

[deleted]

Re: Java is better than C++ for high speed trading systems

#247

Earlier quoted context omitted.

The worst (messiest, laziest and most chaotic) engineer I know works at a brokerage, coding obscenely large and unreliable edifices (and in a number of languages, from C++ to Excel+VB)... He does what he is asked, and doesn't worry about telling them what they need. They never demand code that doesn't crash, they see that as a fact of life, and developers are an overhead. Basically someone else owns the risk, the bro…

^^This^^ is why you shouldn't call software developers "engineers" (disclaimer, am software developer). "No-one ever explicitly specified that the bridge shouldn't fall down and kill everyone who was on it at the time", said no engineer, ever.

On the opposite end you have programmed obsolescence for example that is definitely an engineering art. It takes talent and effort to make things fail.

Re: Java is better than C++ for high speed trading systems

#248
"If you're not a really good C++ developer, you can shoot yourself in the foot and bring an entire project down."

I'm tired of hearing this and other myths like "C++ is for geniuses". When are we going to acknowledge that managers only care about shipping feature fast regardless of the quality of the codebase? I work professionally with "productive languages" and I could claim the same thing about javascript and others.

On this article it is very clear that companies won't invest in proper training, quoting: "Most Java developers are web developers and are used to modelling things they can see" and "We began by hiring people from trading floors, but have more recently hired Masters and PhD students"

This is a culture problem, not a language one. If anything, C++ will always perform much better than Java. Claiming the opposite because you assume your coders don't know what they're doing, it's just ridiculous.

Re: Java is better than C++ for high speed trading systems

#250

I’ve seen this sentiment before and worked on both a “low latency Java” team and low latency C++ teams. I have some sympathy for the idea that the JVM is better since it means you won’t spend all your time chasing crash reports. The thing is, like another comment hinted at, is that this issue is generally more reflective of the environment you build in than the technology choice. Here’s a good talk on the reasons for…

VHDL is faster no?
Post reply on HN