6 ms·
Genuine question, but if that were true then why does High Frequency Trading and Performance critical applications use C if GCs can beat it?
by mr_00ff00 4y ago
Genuine question, but if that were true then why does High Frequency Trading and Performance critical applications use C if GCs can beat it?
- zaphar 4y agoThe two biggest languages I'm aware of in that space are Java and C++. I don't think I've heard of any shop using C. Java seems to be keeping up with C++ there as far as I know. Do you have evidence to the contrary?
- mr_00ff00 4y agoYeah I guess I used C and C++ interchangeably, but I believe C++ is the language of HFT. Do you have evidence to the contrary?
- pjmlp 4y ago"Why we chose Java for our High-Frequency Trading application" https://medium.com/@jadsarmo/why-we-chose-java-for-our-high-frequency-trading-application-600f7c04da94 https://medium.com/@jadsarmo/why-we-chose-java-for-our-high-...
- mr_00ff00 4y agoI don’t think your article makes the claim Java keeps up with C++. That article seems to be about getting latency low and consistent so Java can compete with C++.
- pjmlp 4y agoIt keeps enough when the measurement is delivering products into production, that is what matters to business owners, not winning language benchmarks.
- mr_00ff00 4y agoFair enough, although is Java specifically the only language that could do this? It surprises me that people turn to Java instead of say Go or Elixir or (keeping on topic with the article) Swift?
- zaphar 4y agoThere is a long tail of other languages. JaneStreet uses Ocaml. I wouldn't be surprised if there was some usage of Go out there. I'm familiar with at least one trading house that uses Elixir. The bulk of it is Java or C++ though.
- pjmlp 4y agoDue to language features, ecosystem and tooling, neither Go nor Elixir are even close, in what Java has improved upon since 1996. Swift is mostly Apple platforms.
- saagarjha 4y agoHFT often does use languages that run on GCs.
- deleted 4y ago[deleted]
- pkulak 4y agoBecause that is _very_ latency sensitive, not throughput sensitive.
- neerajsi 4y agoGC has worse p99 latency, even if it may have better throughout. Also, with manual memory management, you can do all your allocs and frees on other threads that are not executing your latency sensitive logic. With GC, you have to at least execute a stack scan on every thread, and possibly a few extra stw passes. The highest performance gcs also have a lot of peanut butter costs from read barriers.