three things, in the order they happened.
-
the optimizer is smarter than me about loops. it is dumber than me about names. when i renamed an inner variable from
tmptopartial_sumthe generated assembly got worse. nobody warned me. i had to read the IR. -
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.
-
every "temporary" type alias outlives me. write the long form.
type T = ...becomesTbecomesnew 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.