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!

  • Default User Avatar

    clever, but in my eyes to many recalculations which could have been saved in a variable