518
New language (lemmy.world)
submitted 3 months ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 13 points 3 months ago

Those who say such things are straight ignorant

[-] [email protected] 9 points 3 months ago

They’re basically fashion victims.

[-] [email protected] 6 points 3 months ago

I wouldn't say so. They are inexperienced. They don't know where the bottleneck of most of the modern software is (it's io in 80-90% of cases) and how to optimize software without rewriting it to C++

[-] [email protected] -4 points 3 months ago* (last edited 3 months ago)

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.

[-] [email protected] 3 points 3 months ago* (last edited 3 months ago)

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.

[-] [email protected] 0 points 3 months ago

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.

this post was submitted on 05 Apr 2024
518 points (94.3% liked)

Programmer Humor

18388 readers
529 users here now

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

founded 1 year ago
MODERATORS