Linked by Thom Holwerda on Mon 30th Apr 2012 19:17 UTC, submitted by bowkota
Legal Java creator James Gosling: "Just because Sun didn't have patent suits in our genetic code doesn't mean we didn't feel wronged. While I have differences with Oracle, in this case they are in the right. Google totally slimed Sun. We were all really disturbed, even Jonathan: he just decided to put on a happy face and tried to turn lemons into lemonade, which annoyed a lot of folks at Sun." Ouch. Also, doesn't jive with Schwartz' comments - might be illustrative of how bad things really were at the once great Sun.
Thread beginning with comment 516876
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[5]: C++ forever
by Kebabbert on Thu 3rd May 2012 08:22 UTC in reply to "RE[4]: C++ forever"
Kebabbert
Member since:
2007-07-27

Java is bad in many other ways than speed.

Agreed, but speed is not one of the problems.


Right. I believe you. Every single line of code in NASDAQ is Java, while every single line of code in LSE is C++. I'm also to believe that NASDAQ Java does not use any JNI or farms out to non-Java systems. So I assume, then, that the databases and backup solutions for NASDAQ are also written in 100% Java.

The important subsystem is the Matching Engine. It inserts incoming orders, and matches them to other orders. Then the matched deal is sent further to other subsystems to handle the administration. But the important thing is the Matcher, it needs to be fast with ultra low latency and extreme throughput. If not, then the stock exchange will be slow and the HFT firms and Algotrading firms will prefer to trade on another exchange.

The Matcher in NASDAQ is written in Java. There are many other subsystems, the clearing subsystems, the database, etc. But the critical part is the matcher. Much of NASDAQs critical parts is written in Java, but some parts are not. For instance the database.


Yes, but how many? What is the parallel set up? What is the NETWORK hardware? What is the total setup

It varies from system to system, but my point is:

The flaw in your argument is that you expect us to believe NASDAQ and the LSE are implemented in exactly the same way using the exact same algorithms, the only difference between the two being the language used.

Well, all the fastest stock exchange systems have a matcher that uses UDP, not TCP/IP. You can only achieve sub 100 microseconds with UDP. If you know how to do in another way, tell me, and I will introduce you to one of the largest exchanges in the world, and we will hire you, and you will become rich.

The algorithm to match orders are similar. Basically they are doing the same thing. It is like sorting numbers. In how many ways can you sort numbers? All exchanges are doing the same thing and therefore can be compared. If C++ gives lower latency than Java, then everybody switches to C++. If Mainframes give lower latency, then everybody switches to Mainframes.



If I'm not mistaken, the NASDAQ and LSE would be making upgrades and hot-swaps all the time. Do you really expect people to believe that these latency figures are static and directly reflects the languages being used?

No, they are not doing hot swaps and upgrades. In the Evening, the exchange closes and that is when you do upgrades, but that takes lot of testing. The exchanges are slowly going to continuous trading 24/7, but in the evening they are closed where back office and clearing work can take place.

Of course the latency varies. Typically the exchanges say something like: "95% of all incoming orders are matched in 100 microseconds, and 3% are matched in 150 microseconds, etc". But that number is from the gateway to the matcher and back again, thus this number is interesting for co-location (where the trader has the server in the same building as the Matcher). For which we charge a lot. ;)


Java can be fastest in the world? So you're saying Java has surpassed Fortran in supercomputing? Not even I go so far as to say C++ is better than Fortran for speed.

No, Fortran and Assembler are of course faster. My point is: Java has not performance problems. Theoretically, Java can be faster than compiling once like C++ does.

Reply Parent Score: 2

RE[6]: C++ forever
by kwan_e on Thu 3rd May 2012 12:11 in reply to "RE[5]: C++ forever"
kwan_e Member since:
2007-02-18

No, Fortran and Assembler are of course faster. My point is: Java has not performance problems. Theoretically, Java can be faster than compiling once like C++ does.


Yes, and my point is that your point is completely irrelevant because it comes down to implementation of the language itself, which is not, in any logical sense, a part of the DEFINITION of a language.

C++ is not defined to be compiled to machine code once only. Neither is Java defined to be compiled to a JVM.

You may as well be arguing that a PostgreSQL server is faster than C++. It's a completely meaningless comparison.

Reply Parent Score: 2

RE[7]: C++ forever
by Kebabbert on Fri 4th May 2012 08:24 in reply to "RE[6]: C++ forever"
Kebabbert Member since:
2007-07-27

Yes, and my point is that your point is completely irrelevant because it comes down to implementation of the language itself, which is not, in any logical sense, a part of the DEFINITION of a language.

You may as well be arguing that a PostgreSQL server is faster than C++. It's a completely meaningless comparison.

My point is relevant, because there are only a few ways to do a fast Matcher. All the matchers are built roughly the same.

For instance, let us talk about FPS games. They are built in C++, and have similar structure. A physics engine, graphics engine, etc. They are all very similar to each other. There are only a few ways to build a fast FPS game. Thus, you can compare between different games.

The same with stock exchanges. They are all similar, and you can compare between them. Now it turns out that the fastest stock exchanges are using Java or C++, on the same hardware, using the same network and routers. All exchanges use the same routes with the fastest performance, we use Arista routers which are among the fastest. I can not believe that other exchanges use slower routers, no, they use routers with similar performance as Arista. All exchanges use the fastest gear, or gear with similar performance.

There is no performance difference in performance between the gear. If one vendor was much faster, everyone would switch hardware. Now one vendor is called Arista and offers X performance. Another vendor is called Cisco and offers X performance. It does not matter which vendor an exchange use, as long as the vendors offer similar performance. If one vendor is faster, every exchange switch hardware.

All exchanges are using similar hardware, and still Java exchanges rival C++ exchanges. What does this prove? That Java is slow? No, it proves that Java can rival C++.

My point is this: Java can rival C++. If C++ were faster, then every stock exchange would switch to C++. All the exchanges are built roughly similarly, and offer similar performance. Now the fastest exchanges are 100 microseconds. All of them. No exchange has 50 microseconds. If one exchange would have 50 microseconds, everyone would rebuild their solution to match 50 microseconds. Just look at the numbers for the fastest exchange, they are the same.

Reply Parent Score: 2