but note that if you do 3 comparisons, or 2 comparisons and an "extra" comparison, you've done the same number of comparisons, it's not really 'extra'
then go ahead and keep adding factors and see which results in more comparisons as we rack up the actually extra comparisons for various combinations of factors
btw and ftw, your modulo and string test example, more correct than the usual implementation, is among the most efficient:
but note that if you do 3 comparisons, or 2 comparisons and an "extra" comparison, you've done the same number of comparisons, it's not really 'extra'
then go ahead and keep adding factors and see which results in more comparisons as we rack up the actually extra comparisons for various combinations of factors
btw and ftw, your modulo and string test example, more correct than the usual implementation, is among the most efficient:
http://www.zoharbabin.com/which-fizzbuzz-solution-is-the-mos...
// still not so serious...