News for hackers. Stuff that matters.
Re:Rust vs C Pitfalls by hueving on Wednesday December 28, 2016 @03:50AM (#13269334)
>It's plenty fast

Unless you need guarantees that can't be offered by garbage collection.

Re:Rust vs C Pitfalls by adrianN on Wednesday December 28, 2016 @05:07AM (#13269601)
Java is pretty popular for HFT applications. I think most programs are less latency sensitive than that. But of course, Java is not for you if you have hard real time constraints.
Re:Rust vs C Pitfalls by the8472 on Wednesday December 28, 2016 @09:14AM (#13270553)
There's a commercial pauseless GC offering for java. It's pretty much aimed at HFT applications.

https://www.azul.com/resources/success-stories/

Re:Rust vs C Pitfalls by fpoling on Wednesday December 28, 2016 @06:48AM (#13269929)
In some cases those HFT installations are tuned not to run full Java GC within 8 hours during the trading day. Then they are rebooted.
Re:Rust vs C Pitfalls by njs12345 on Wednesday December 28, 2016 @08:25AM (#13270301)
That sounds interesting - have you got any more details on exactly how they set this up?
Re:Rust vs C Pitfalls by gravypod on Wednesday December 28, 2016 @09:00AM (#13270469)
You can also use the Java Unsafe class to squeeze performance (every last bit) by recycling objects. I'm sad to say that I've had to do that at least once to make some vector math work.

Edit: Check out https://dzone.com/articles/understanding-sunmiscunsafe

Re:Rust vs C Pitfalls by fpoling on Wednesday December 28, 2016 @10:32AM (#13271094)
A person on a conference has not mentioned details. The reason for Java is productivity and access to a bigger pool of developers.
Re:Rust vs C Pitfalls by notsoeasy on Wednesday December 28, 2016 @07:09AM (#13270003)
> I think most programs are less latency sensitive than that.

Hardly, compared to anything that takes user input and aims at 60/120 FPS (where you inevitably end up bypassing GC if you can't force it to run when you want to).

https://www.quora.com/Is-Java-overtaking-C++-in-the-HFT-worl...

> One thing about HFT is that the speed of the language oddly doesn't matter much. You are talking about latencies of 20 milliseconds, and any language can do 20 milliseconds since CPU times are measured in nano-seconds rather than milisecond.

and

> If you are playing in the sub 10 microsecond range doing everything in C++ helps a lot. [..] A lot of high frequency strategies run in the 20-30 microsecond time frame. I think this is where a lot of diversity in terms of setup occurs.

and

> To lower execution costs, we need a low latency system that has good determinism in response times. You cant pause for hash table rebucketing or garbage collectors or the OS taking away your time slice or moving you to a diferent processor or whatever. There are guys who try this in Java, and spend most of their time trying to make Java work deterministically. Good luck

and

> If you are in ultra HFT then C++ is the only answer (besides custom hardware - FPGA & ASIC). You just can't afford garbage collector.