or download this
Benchmark: timing 1000000 iterations of Grep, Max, Ternary...
Grep: 9 wallclock secs (10.02 usr + 0.00 sys = 10.02 CPU) @ 99
+760.57/s (n=1000000)
...
Ternary: 22 wallclock secs (21.31 usr + 0.00 sys = 21.31 CPU) @ 46
+926.33/s (n=1000000)
This is perl, v5.6.0 built for MSWin32-x86-multi-thread