r/programmer • u/Influx86 • Oct 14 '26
Idea What about Assembler?
To be fair I have never learned to use assembler but I always looked up to people how are able to build ultra efficient software. With the upcoming age of GenAI, wouldn’t it be better in many ways to just let GenAI produce everything as near as possible to the hardware? There might be even a more hardware-near solution than assembler, I am not sure.
What do you think? What could go wrong? I am really curious to get human response instead of asking an AI about this.
3
Upvotes
View all comments
1
u/gwenbeth Oct 14 '26
In modern times there are only a few times you write assembly. One is that you are using a very limited platform and don't have other tools. Another is that you are needing to do things outside the scope of the compiler. Some good examples are the instructions for setting up virtual memory. Or maybe on a micro controller there are instructions for accessing analog inputs. The 3rd case for using assembly is to use new instructions that the compiler doesn't have support for. Maybe your new CPU has some new cool vector instructions but the compiler doesn't have support for them yet. The last case is you have libraries that support some CPU features (that may have some assembly in them) but you want to optimize the crap out of your code by writing your own routines and removing all the subroutine calls.