Redirecting output to a file makes a big difference in KC's program, but none in mine:
This is with a 25 line vertical console window. A full sized console window will slow down the program, so I test them all with the same 25 line size window.Code:KC's program: 1.2 seconds down from 15 seconds My program: 2.1 seconds unchanged writing to stderr or stdout console " " 2.9 seconds writing to stdout, redirected to a file