r/ProgrammerHumor • • Jan 16 '14

[deleted by user]

[removed]

1.3k Upvotes

446 comments sorted by

View all comments

1

u/Rikkety Jan 17 '14

To be fair, this pseudo-code is by far the fastest implementation. It doesn't have the overhead of a loop, nor the expensive modulo and comparison operations.

If the question was to optimize for speed, this is exactly how I would do it (except maybe a "printf" or something similar preceding each line.