Add enough runs and nimcr + gcc should also win. Only the first run takes a long time with your command, so more runs brings down the average. The other commands aren't so favored.
Of `nim r`, consider: $ head -1 /dev/urandom|wc -m > changing-file $ nim r check.nim 157 $ head -1 /dev/urandom|wc -m > changing-file $ nim r check.nim 66 Run vs. $ ./check.nim 66 $ head -1 /dev/urandom|wc -m > changing-file $ ./check.nim 66 Run `nim r` saves you from running the C compiler. `nimcr` saves you, also, from running the Nim compiler.