Archive for 2013-06-30
How pqR makes programs faster by not doing things
One way my faster version of R, called pqR (see updated release of 2013-06-28), can speed up R programs is by not even doing some operations. This happens in statements like for (i in 1:1000000) ...
, in subscripting expressions like v[i:1000]
, and in logical expressions like any(v>0)
or all(is.na(X))
.
This is done using pqR’s internal “variant result” mechanism, which is also crucial to how helper threads are implemented. This mechanism is not visible to the user, apart from the reductions in run time and memory usage, but knowing about it will make it easier to understand the performance of programs running under pqR. (more…)