5 ms·
>It's plenty fast Unless you need guarantees that can't be offered by garbage collection.
by hueving 10y ago
>It's plenty fast
Unless you need guarantees that can't be offered by garbage collection.
- adrianN 10y agoJava 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.
- fpoling 10y agoIn some cases those HFT installations are tuned not to run full Java GC within 8 hours during the trading day. Then they are rebooted.
- njs12345 10y agoThat sounds interesting - have you got any more details on exactly how they set this up?
- gravypod 10y agoYou 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 https://dzone.com/articles/understanding-sunmiscunsafe
- fpoling 10y agoA person on a conference has not mentioned details. The reason for Java is productivity and access to a bigger pool of developers.
- notsoeasy 10y ago> 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-world 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.
- the8472 10y agoThere's a commercial pauseless GC offering for java. It's pretty much aimed at HFT applications. https://www.azul.com/resources/success-stories/ https://www.azul.com/resources/success-stories/