5 ms·
That’s the question worth asking imo. I was wondering how fast is the idiomatic Java solution
by sharno 3y ago
That’s the question worth asking imo. I was wondering how fast is the idiomatic Java solution
- lucianbr 3y ago71 seconds https://questdb.io/blog/billion-row-challenge-step-by-step/ https://questdb.io/blog/billion-row-challenge-step-by-step/
- kaba0 3y agoIs that the same hardware? Otherwise it doesn’t say much.
- KingOfCoders 3y agoJava is often slightly faster than Go, has similar (perhaps, older, better optimized Map) constructs, perhaps better GC (older, more optimized), though I don't think the GC is a challenge, has slower startup times - so I'd say roughly the same as the idiomatic Go version?
- kaba0 3y agoJava’s GC is just incomparably better, literally every research on the topic is written for Java. Though that’s true that without value types, Java does rely slightly more on it.
- geodel 3y agoIt could be matter of fact comment if incomparably better and slight reliance are brought to the middle.
- Xeoncross 3y agoJava can be faster than Go, but it comes at the same cost as most "faster" things in software: Java uses significantly more memory. Java is also more mature, which means you are entering a massive package-bloat setup that has evolved over the years to work for everyones wild and varied needs. By the time you have your database, cache, http/other handlers, tests, fixtures, metrics, logging, tracing, etc... setup you're looking at a scary pile of dependencies spanning thousands of classes that would make even NPM jealous.
- benhoyt 3y agoOn my machine the simple/idiomatic "baseline" Java solution (https://github.com/gunnarmorling/1brc/blob/main/src/main/java/dev/morling/onebrc/CalculateAverage_baseline.java https://github.com/gunnarmorling/1brc/blob/main/src/main/jav...) takes 2m0s, compared to 1m45s for my simple Go version.