logoalt Hacker News

Pannoniaelast Friday at 9:46 PM2 repliesview on HN

Compilers massively outperform humans if the human has to write the entire program in assembly. Even if a human could write a sizable program in assembly, it would be subpar compared to what a compiler would write. This is true.

However, that doesn't mean that looking at the generated asm / even writing some is useless! Just because you can't globally outperform the compiler, doesn't mean you can't do it locally! If you know where the bottleneck is, and make those few functions great, that's a force multiplier for you and your program.


Replies

simonasklast Friday at 10:09 PM

It’s absolutely not useless, I do it often as a way to diagnose various kinds of problems. But it’s extremely rare that a handwritten version actually performs better.

jesse__last Friday at 10:53 PM

yo, completely off topic, but do you work on a voxel game/engine?

show 1 reply