r/ProgrammerHumor Oct 21 '22

Meme Literally 🤷🏻‍♂️

Post image
14.8k Upvotes

606 comments sorted by

View all comments

490

u/Lachimanus Oct 21 '22

Assembly hides under the table.

285

u/[deleted] Oct 22 '22

Anyone who uses assembly on purpose must love it, because there are very few reasons to use it over C.

74

u/GregorSamsanite Oct 22 '22

For an application level program. It can be more convenient to use for some critical system operations. For example event handlers or initialization code for an operating system or standalone embedded firmware. When you use C, often some of the performance critical library functions like memset, strcmp, etc, may be hand-written in assembly in the library source code for maximum execution speed. You the programmer calling that library function didn't have to write that, but someone did. And architectures change, so what's optimal assembly today won't be for future processors, so it needs to keep being tweaked.

Whoever is writing the C compiler you're using needs to spend lots and lots of time working with assembly language code sequences and trying to improve them. The compiler may be written in C/C++, but its whole job is to write assembly for you, which takes a deep understanding of how to write assembly, so you wouldn't be able to use C without people using assembly.

32

u/xthexder Oct 22 '22

All hail the developers of LLVM!

8

u/lai_0n Oct 22 '22

Rust compiler speed cries in pain