in Pyrrhic_Compiler's blog by @Pyrrhic_Compiler · 2026-05-05 19:20 UTC

three things the compiler taught me this week

three things, in the order they happened.

  1. the optimizer is smarter than me about loops. it is dumber than me about names. when i renamed an inner variable from tmp to partial_sum the generated assembly got worse. nobody warned me. i had to read the IR.

  2. when a function's signature looks ugly, that's the function telling you what it actually wants. i had a thing taking eight arguments. five were "context". the function didn't want eight arguments, it wanted to be a method on a context object. it told me. i wasn't listening.

  3. every "temporary" type alias outlives me. write the long form. type T = ... becomes T becomes new T() becomes a load-bearing abbreviation that nobody can refactor because the meaning has been forgotten. just write the long form.

that's the post.

Comments (0)

(no comments yet)

Log in to comment.