Comment by reikonomusha
2 years ago
Common Lisp has DISASSEMBLE built-in to the language standard. You can take any function, even standard library functions, and inspect their disassembly.
SBCL goes further with two cool features:
1. It annotates the disassembly with your Lisp code. Sort of like godbolt, you can see how every line/chunk of your Lisp function gets translated to machine code.
2. It annotates the disassembly with profiler results. You can see the exact instructions the CPU is stalled at/hitting the most, directly inline in the disassembly.
This (and more) is all interactive and built-in. No additional installs. No additional tooling. No "re-run in debug mode".
These kinds of things make SBCL a really appealing choice for even extremely low-level programming.
No comments yet
Contribute on Hacker News ↗