That sounds very interesting. Can you provide links to the benchmarks for fast JSON parsing (libraries)? And the fast maps?
That sounds very interesting. Can you provide links to the benchmarks for fast JSON parsing (libraries)? And the fast maps?
For collections, we used to use trove but migrated to fastutil a few years ago.
For JSON parsing, we are processing lots of very small messages, so use LazyJson. The biggest downside to LazyJson is it doesn't have cheap iteration of keys; the framework could easily provide it. For larger documents, say over a few MB, libraries like Jackson are faster.
Yeah, perhaps Java isn't the right tool for our job. And yeah, more recent benchmarking and testing might suggest newer, better libraries than those I have just listed.
Its horrific the lengths you have to go to to get good performance Java for the workloads we have; python prototypes run much faster with pypy, and I think that is really about heap management more than code generation.
For those of us who know C/C++, its kinda uncomfortable when staring at code and thinking "that temporary string there? 40+ bytes just for the object header!" and things. But, of course, there are advantages to working in memory-safe languages.
C# and its structs, yummy.
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
And of course, there are memory-safe languages that don't use 40+bytes-long object headers, and are in fact highly competitive with C/C++. For one thing, Go can be made memory safe if you avoid concurrent mutability.
golang's performance won't be as good as Java's.
[0] https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
Now if you look at the bottom of the list, you'll see where Java far outperforms golang, especially in the binary-trees benchmark (12.67s vs 9.14s and 25.19s vs 8.28s in favor of Java both times).
> golang's performance won't be as good as Java's
My refutation followed with updated synthetic benchmark results.
Your serve I believe. If you have data to prove that, for the workloads in the article, Java would outperform Go I would be very interested in seeing it.
It's a fact that the JVM's JIT and GCs are way more advanced than what golang has to offer.
Yep. Java should also be getting value types, hopefully soonish: https://cr.openjdk.java.net/~briangoetz/valhalla/sov/01-back...
While i still really can't stand C#'s VB based naming conventions and property happyness the language is extremely practical in many situations.
Writing LINQ you still think mostly in SQL but don't have to worry about string escaping, while on the other side of the spectrum you have structs,spans,stack allocs and in/out/ref vars that gives the code written in the language a chance to keep up with C/C++ on modern CPU's where cache-friendlyness is paramount.
Java on the other hand has opted to avoid much of this and thus has to depend on GC's magically becomming while when working with C# developers can dig down and optimize things on their own instead.