Don’t get me started on Java performance!
Java made things fast at the macro level by making threading possible. Remember trying to do any kind of portable multi core in C/C++ in 2000? It was no surprise JVM languages took over and became what we’ve built Big Data on (Hadoop, Hive, spark, etc)
But they leave so much on the table for micro performance! Take a CSV or JSON parser for example - likely spends all its time extracting string objects!
Now the Big Data community mostly doesn’t notice; for example, the Parquet code is about 5x slower than the Orc code, apparently, but we all adopt Parquet anyhow.
I’ve been going through my java codebases doing the basic stuff like “let’s write a simple fast json parser that doesn’t make a lot of garbage” and you can easily half the number of boxes you need etc. sometimes order of magnitude improvements by writing java code that is more like C.
But there’s this level you cannot reach. You look longingly at the raw mechanical sympathy C enabled.
Perhaps Rust is the future? I expect we’ll just keep using more cores than necessary though.
Java made things fast at the macro level by making threading possible. Remember trying to do any kind of portable multi core in C/C++ in 2000? It was no surprise JVM languages took over and became what we’ve built Big Data on (Hadoop, Hive, spark, etc)
But they leave so much on the table for micro performance! Take a CSV or JSON parser for example - likely spends all its time extracting string objects!
Now the Big Data community mostly doesn’t notice; for example, the Parquet code is about 5x slower than the Orc code, apparently, but we all adopt Parquet anyhow.
I’ve been going through my java codebases doing the basic stuff like “let’s write a simple fast json parser that doesn’t make a lot of garbage” and you can easily half the number of boxes you need etc. sometimes order of magnitude improvements by writing java code that is more like C.
But there’s this level you cannot reach. You look longingly at the raw mechanical sympathy C enabled.
Perhaps Rust is the future? I expect we’ll just keep using more cores than necessary though.