Re:We chose Java for our high-frequency trading application
by neomantra on Monday October 26, 2020 @11:56AM
(#24897556)
And before Java, it used Microsoft FoxPro! Here's the source code:
https://josh.com/notes/island-ecn-10th-birthday/ https://josh.com/notes/island-ecn-10th-birthday/ISLAND.PRG.T...
Re:We chose Java for our high-frequency trading application
by clausok on Monday October 26, 2020 @12:10PM
(#24897693)
More color on the original FoxPro matching engine:
"Levine found a simple but hugely consequential 'trick' to speed matching. In Levine’s later paraphrase, what the 'enter2order' procedure did when the Island system received a new order was to: 'See if there was a record from a recently cancelled order that we can reuse for this new order. This is hugely important because that record will likely still be in the cache [fast internal memory] and using it will be much faster than making a new one. (Levine, n.d.)'"
http://www.sps.ed.ac.uk/__data/assets/pdf_file/0003/97500/Is...
Re:We chose Java for our high-frequency trading application
by secondcoming on Monday October 26, 2020 @11:31AM
(#24897244)
I bet they used a bit of sun.misc.Unsafe too
https://blogs.oracle.com/javamagazine/the-unsafe-class-unsaf...
Re:We chose Java for our high-frequency trading application
by taion on Monday October 26, 2020 @11:56AM
(#24897555)
Less than you'd think – it comes up in serializing/deserializing data, somewhat, because JNI has a fair bit of overhead, but this isn't really like Rust's "unsafe". To have fast Java, you really need the JIT to be happy, and that's not a safe bet if you're doing random things with Unsafe.
This was a pretty reasonable choice at the time, as this was long before C++11 was around, and Java just offered a lot of advantages for developer ergonomics.
A natural consequence of this is that a number of HFT shops that were seeded by ex-ISLD devs just fell into using something like the ISLD tech stack, which at least at first involved a lot of GC-free Java.