BeigeAgenda,
@BeigeAgenda@lemmy.ca avatar

No its not the wrong solution! Premature optimization is a waste of time.

Using if or case are not a solution because they are way too verbose and very easy to introduce an error.

Modulo is a solution, and using bit-wise and is another faster solution.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines