Skip to content

References: The Abstraction Ladder: Python, C, and Assembly Compared

  1. Abstraction (computer science) - Wikipedia - Explains how programming languages hide implementation detail behind layers of convenience, the general principle behind this chapter's five-rung ladder from plain MicroPython down to hand-written assembly.

  2. Bytecode - Wikipedia - Describes compact, portable instruction sets interpreted by a virtual machine, exactly what MicroPython compiles ordinary .py source into before its interpreter loop walks through it one instruction at a time.

  3. Boxing (computer science) - Wikipedia - Covers wrapping a primitive value in a heap-allocated object versus storing it as raw bits, the exact boxed-versus-unboxed distinction this chapter uses to explain why @micropython.viper outperforms plain Python.

  4. Computer Organization and Design ARM Edition: The Hardware Software Interface - David A. Patterson and John L. Hennessy - Morgan Kaufmann/Elsevier - Patterson and Hennessy are credited with the classic translation-hierarchy diagram tracing a program from high-level language through compiler, assembler, and linker down to machine code, the pedagogical ancestor of this chapter's abstraction ladder.

  5. Crafting Interpreters - Robert Nystrom - Genever Benning (self-published) - Nystrom is widely credited with an unusually clear, concrete explanation of how a bytecode virtual machine represents values in memory (tagged unions and, in an advanced chapter, NaN boxing), the exact pointer-chasing-versus-raw-bits cost this chapter attributes to Python's boxed numbers.

  6. Maximising MicroPython speed - MicroPython Documentation - Official documentation for the @micropython.native and @micropython.viper code emitters, including viper's machine-type annotations, the two intermediate rungs this chapter places between plain bytecode and C.

  7. Optimize Options - GNU Project (GCC Documentation) - Reference for the -O0 through -O3 and -Os compiler optimization flags this chapter discusses as the mechanism by which a C compiler trades code size for runtime speed.

  8. Arm GNU Toolchain - Arm Learning Paths - Official installation guide for the arm-none-eabi-gcc toolchain, the free GCC compiler this chapter names as the de facto standard for compiling C to Cortex-M33 machine code.

  9. Code Optimization in Compiler Design - GeeksforGeeks - Surveys compiler optimization techniques such as loop unrolling, function inlining, and dead code elimination, the automated transformations this chapter contrasts with the manual control of hand-written assembly.

  10. Why is Python so slow? - Anthony Shaw - Analyzes how bytecode interpretation and dynamic typing add per-operation overhead compared to compiled languages, reinforcing this chapter's account of why plain MicroPython sits at the top (slowest) rung of the ladder.