News for hackers. Stuff that matters.
Re:Why Rust Isn't Killing C++ by khuey on Thursday May 02, 2024 @12:12PM (#40237909)
> Most applications that use C++ are latency and efficiency critical.

I'll take the under on this. There are plenty of C++ applications that are "latency and efficiency critical" but I'd guess it's well under 50% of all the C++ software out there.

Re:Why Rust Isn't Killing C++ by ghshephard on Thursday May 02, 2024 @12:16PM (#40237949)
Not to mention that the demonstration I've seen of a sub microsecond trading platform was written in Java. and talking to my manager who used to be a developer in high-frequency trading - he tells me that's a pretty common language in that space. Which, I'll be honest, kind of blew my mind.
Re:Why Rust Isn't Killing C++ by thefaux on Thursday May 02, 2024 @12:21PM (#40238019)
Yes, it is surprising initially but I can imagine that hft java coding conventions are very different from enterprise java.
Re:Why Rust Isn't Killing C++ by bluGill on Thursday May 02, 2024 @01:11PM (#40238632)
Java, and even python are used in HFT, along with many other languages. Depending on the task they can work well or poorly.

C++ has a good position in this space though because often you come down to a if(something){doTrade();} and java's optimizer has figured out that this if is normally false and so you pay a CPU branch missprediction penalty, while C++ had optimized for the true case and so when it matters is faster.

No matter what the language used, HFT has some different programming styles vs normal.

Re:Why Rust Isn't Killing C++ by afdbcreid on Thursday May 02, 2024 @06:41PM (#40242173)
> while C++ had optimized for the true case

Which is why we have Profile Guided Optimization.

Re:Why Rust Isn't Killing C++ by bluGill on Thursday May 02, 2024 @07:51PM (#40242609)
Which is also what screws java as the runtime notices the false case is most common and so is willing to stall the pipeline when performance matters most.
Re:Why Rust Isn't Killing C++ by bluGill on Thursday May 02, 2024 @01:07PM (#40238588)
When we started our current system 15 years ago (Rust wasn't an option) 5% of the code needed C++, so everything was written in C++ as there is too much friction trying to make with a different language.

I'm sure there was something other than C++ that would have worked just as well. I don't know what it would be, but there are many options. Even then the article makes a good point: we can hire C++ developers, could we hire someone who knows the other option?

Re:Why Rust Isn't Killing C++ by BeetleB on Thursday May 02, 2024 @02:15PM (#40239594)
> There are plenty of C++ applications that are "latency and efficiency critical" but I'd guess it's well under 50% of all the C++ software out there.

Easily well under 5%, and I'll assert it's under 1%.

Re:Why Rust Isn't Killing C++ by khuey on Thursday May 02, 2024 @02:16PM (#40239612)
Yeah I'd agree.