Skip to content
Prev 43995 / 63424 Next

Possible page inefficiency in do_matrix in array.c

On Sep 2, 2012, at 10:04 PM, Matthew Dowle wrote:

            
That is completely irrelevant - modern compilers will optimize the loops accordingly and there is no difference in speed. If you don't believe it, run benchmarks ;)

original
Unit: milliseconds
                               expr      min       lq  median       uq      max
1 matrix(nrow = 10000, ncol = 9999) 940.5519 940.6644 941.136 954.7196 1409.901


swapped
Unit: milliseconds
                               expr      min       lq   median      uq      max
1 matrix(nrow = 10000, ncol = 9999) 949.9638 950.6642 952.7497 961.001 1246.573

Cheers,
Simon