TIL that nasm does optimisation!
It will convert `mov rax, 1` to `mov eax, 1` unless you specify -O0.
Handy, but surprised me when tinkering with some machine code.
miniblog.
Related Posts
I really like languages that store their runtime stack on the heap, such as Smalltalk.
You can write code as if you have tail call optimisation, but you still have normal stack traces for debugging.
The Self programming language, the optimisation techniques they pioneered, and the emergent design principles: https://youtube.com/watch?v=3ka4KY7TMTU
(Stanford talk by one of the creators)
Applying different profile guided optimisation techniques to the rust compiler:
