logoalt Hacker News

still_grokking12/09/20251 replyview on HN

> Lower-level languages don’t have this same problem to the same extent.

Of course they have.

If the computer would directly execute what you write down in what you call "low level language" this would be slow as fuck.

Without highly optimizing compilers even stuff like C runs pretty slow.

If something about the optimizer or some other translation step of a compiler changes this has often significant influence on the performance of the resulting compilation artifacts.


Replies

groundzeros2015last Friday at 6:51 AM

They absolutely do not. The problem is three-fold.

1. The rules for when an optimization works and doesn't is complex and implicit (as seen in this post).

2. The magnitude of performance between getting an optimization and not is significant.

3. When it does fail, you have almost no recourse because you can't express your intent.

Now do C. You have problem 1, but not to the same extent. In rare cases you can see problem 2. And you never have problem 3.

show 1 reply