In my computer this code takes 17 seconds (1000 millions times):
static void Main(string[] args) { var sw = new Stopwatch(); sw.Start(); int r; for
Grrr. The only reason for this function to exist is to take advantage of the CPU instruction for this, and they didn't even do it!