by blablabla123 · 14y ago · 0 comments
Two years ago I have heard about many benchmarks, people saying that higher level languages can be nearly as fast. (Or even faster!) In fact I even believed this because it was said so often and Ruby for instance went fast.
However reality proofed me wrong. When the CPU is going to 100%, C/C++ are always faster. (In case of Ruby it can be orders of magnitude...) However when doing mostly I/O-intense web apps, it pays to have a language that makes performant design easy.
C# and Java can produce very efficient programs, and for a lot of CPU-bound problems the obvious solution in either of those will be faster, particularly stuff that needs to perform lots of little allocations or where the obvious C++ program does too much accidental copying.
However with C++ it's easy to work around that by using pointers or (const) references. Or even one step further one can use a memory pooler or GC.
- Netty vs Nginx - Tomcat vs Apache - Jake2 vs Quake2 - H2 vs PostgreSQL (there is no clear performance winner here)
However, to achieve good performance in high-level languages, I'm afraid you still need a pretty deep low-level knowledge, so learning C can be very beneficial.