Hacker News new | ask | show | jobs
by GravelRocks 1053 days ago
Why aren't we writing everything in assembler? It's so much faster!

There's a huge number of business process where execution time is almost a non-issue. As long as the thing runs every day/week/month/quarter no one will give a crap. Development time, supportabilty, and onboarding time for new developers tend to matter way more for those sorts of processes. For things your shipping out to end users? Optimization and speed tend to matter enough to justify the development cost, but there's an absolute ton of internal business processes, and even internal applications, where optimizing it would cost way more than just running with what the dev team already knows.

1 comments

Context is important.

C++ is generally used by millions of people to whom execution time matters quite a bit. The language is literally designed to force the programmer to decide how to balance CPU cycles with language abstractions and features. It's already hard to debug compared with a lot of other languages (which are generally slower).

The fact that you (and GGP) rarely encounter situations where run time is critical is a limitation on your experience, not a universal law that applies everywhere.

So, context is really important here.

>The language is literally designed

I think that is a matter of some debate.

This isn't even debatable.

>> Efficiency has been a major design goal for C++ from the beginning, also the principle of “zero overhead” for any feature that is not used in a program. It has been a guiding principle from the earliest days of C++ that “you don’t pay for what you don’t use”.

https://www.stroustrup.com/Performance-TR.pdf