5 ms·
C# sure, but unless you are doing something pretty close to the core purpose of some giant java framework java is slow and verbose
by galangalalgol 4y ago
C# sure, but unless you are doing something pretty close to the core purpose of some giant java framework java is slow and verbose
- tasubotadas 4y agoSlow and verbose compared to what?
- ntonozzi 4y agoJava, Go and C# (and node) have very similar performance, e.g. https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/go.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/.... For all of them, the key to writing high performance code is avoiding allocations and boxing. Go and C# both do this slightly better than Java, but in most domains where these languages are used, this is not a big difference (and this is where you might use C/C++/Rust instead). I've found Go to be more verbose than Java, but I haven't used Go much since generics were released.
- maleldil 4y agoIt's amazing how the "Java is slow" myth survives to this day.
- johnny22 4y agoi just read "java is slow" as "java is slow to startup" and that helps. Java is slow(er) to to startup, but once it's going, it's pretty good.
- maleldil 4y agoThat doesn't matter if you're writing a REST api. If you're writing a CLI app, then I agree that's a problem.
- dboreham 4y agoSometimes matters, e.g. when you deploy new code.
- oauea 4y agoNot really, just do a rolling deployment like you should be doing anyway. No one cares if the new version takes 1 millisecond to start up or 3 seconds because they literally won't notice.
- imtringued 4y agoBut 3 seconds isn't on the table. It is more like 20-30 seconds on a medium sized app and 8 seconds for a small one.
- bzzzt 4y agoIf your Java app takes half a minute to initialise it's the app's problem, not Java. Modern Java frameworks have moved from a dynamic deployment model to statically compiled and can start in milliseconds. (for example, see the benchmarks on https://quarkus.io/blog/runtime-performance/ https://quarkus.io/blog/runtime-performance/)
- dboreham 4y agoRolling deployment is a hack imho. Adds complexity and hence yet more potential failure modes.
- galangalalgol 4y agoI meant slow to develop in.
- za3faran 4y agoWith features like records, pattern matching, enums, and many more, I find it much better than the likes of Python or golang.