You are viewing a single thread.
View all comments View context
-1 points
*

How are they ignorant? It’s a known fact that java is slow, at least slower than some others. Sure, it’s still fast enough for 95% of use cases, but most code will run faster if written in, say, C. Will have 10x the amount of code and twice as many bugs though.

permalink
report
parent
reply
1 point
*

Java is indeed slower than C, Rust, in some cases than Go.

But that doesn’t mean that

code will run faster if written in, say, C

Again, like 80-90% of production code are bounded by disk/network io operations. You will gain performance from using C in embedded systems and in heavy calculations (games, trading, simulations) only.

permalink
report
parent
reply
-1 points

Which is exaxtly what I said, that it’s fast enough for most use cases.

In theory though, you will “gain performance” by rewriting it (well) in C for literally anything. Even if it’s disk/io, the actual time spent in your code will be lower, while the time spent in kernel mode will be just as long.

For example, you are running a server which reads files and returns data based on said files. The act of reading the file won’t be much faster, but if written in C, your parsers and actual logic behind what to do with the file will be.

But it’s as you said, this actual tiny performance gain isn’t worth it over development/resource cost most of the time.

permalink
report
parent
reply
-1 points

the jvm brings enough bugs to outweigh any benefits there…
it is relatively fast, but it’s slow in that it takes up a bunch of resources that could be doing other things…

permalink
report
parent
reply
0 points

takes up a bunch of resources that could be doing other things…

You cannot get rid of garbage collectors, but you can always compile your java into binary to reduce the memory footprint.

permalink
report
parent
reply
-1 points

sea lion

permalink
report
parent
reply
1 point

the jvm brings enough bugs to outweigh any benefits there…

Please name a few

permalink
report
parent
reply
-1 points

i decline your invite to debate the merits of java and jvm… i will instead walk my dog through this beautiful park here…

but, it’s all been said on top level comments on this post.
it’s trash, and honestly, even if it was perfect, sun microsystems has ruined any potential benefits.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 3.7K

    Monthly active users

  • 811

    Posts

  • 13K

    Comments