Ad
  • Custom User Avatar

    One-liners tend to have that side-effect... And it probably is the case here.

    However, remember that «Premature optimization is the root of all evil»: If I would have to create a big bunch of variables to avoid recalculations, the code would become unreadable quite quick.

    Furthermore, nothing is won when you replace two calculations with an assignment and a calculation! You only start to win something with three or more recalculations avoided!