Benchmarks

The following benchmarks show that P can provide substantial speedups compared to interpreted R as well as R's byte code compiler.

The benchmarks demonstrate that you can expect speedup factors between 10 and 40 when using P instead of R for your own algorithms. Even internal vectorized computations and internal functions usually run much faster. When studying the benchmarks given here you will encounter one example where P runs 125 times faster than R.

 

Speedup Factors

Benchmark R R ByteCode P (Public) P (Pro)
1 (Simple expressions, f) 1  

 9.73

 14.1
1 (Simple expressions, g) 1    11.4 17.2
2 (Path-dependent loops, fun1) 1  1.14  19.28  
2 (Path-dependent loops, fun2) 1  4.05  125  
3 (Singular value decomposition) 1  1.2  3.4  4.55
4 (Fractional brownian motion) 1 1.1 1.8 1.9
5 (Nested loops: Determinant) 1 3.8 19 43

 The results are obtained using R 2.13 and P 2011_06 for OS X 10.6.

 

- to be continued -