ra.png

Ra Timing Tests With Different Loop Counts

Here is a table of raw timing results which show Ra 1.0.5 times with different loop counts.
The measurements were made on a 3 Ghz Pentium D running Windows XP.
For the specifics of each test see the R code here, which is included in the Ra sources.
Back to Ra homepage

Ra 1.0.5 with jit(1)

N is the loop count.
nrepeats is the number of times the test was repeated for timing purposes.
reltime is the Ra 1.0.5 time with jitting relative to the Ra 1.0.5 time with no jitting.
..\..\bin\Rterm <time-jit-full.R
is.ra=TRUE  N.OUTER.REPEATS=5  QUICK.FLAG=FALSE  JIT.FLAG=1

testname                  nrepeats    N      time jittime reltime  jittot
                                               us      us       %    secs

convolve                      4000   10   1040.00   126.00  0.121   0.504
looped.dnorm                200000   10    142.25    49.02  0.345   9.804
while.complex              2000000   10     26.05    29.72  1.141  59.438

vadim1 1                    100000   10     43.26    46.48  1.074   4.648
vadim2 i                    100000   10     38.08    42.16  1.107   4.216
vadim3 i-1                  100000   10     45.04    56.22  1.248   5.622

add1   x <- x + 1           100000   10     15.76    23.06  1.463   2.306
vadim4 x[i-1]               100000   10     69.32    77.02  1.111   7.702
vadim5 x[i] <- 1.0          100000   10     88.82    82.76  0.932   8.276
vadim6 x[i] <- x[i-1]       100000   10    107.06    87.88  0.821   8.788

frame1 for (i in 1:N) 1    2000000   10      4.50     5.79  1.287  11.580
frame2 0                   2000000   10      0.97     2.16  2.236   4.320
frame3 jit(0|1, TRACE.FLAG 2000000   10      1.96     2.15  1.094   4.296

frame4 for (i in 1:nreps)  2000000   10      0.93     0.93  1.002   1.864
frame5 dnorm no call to ji 2000000   10     14.63    14.63  1.000  29.260
frame6 for (i in 1:N) 1    2000000   10      5.93     5.83  0.984  11.670
-------------------------------------------------------------------------
convolve                      4444   30   9001.35   543.20  0.060   2.414
looped.dnorm                222222   30    414.77    63.11  0.152  14.024
while.complex              2222222   30     68.21    72.02  1.056 160.054

vadim1 1                    333333   30     46.13    47.85  1.037  15.950
vadim2 i                    333333   30     41.08    45.23  1.101  15.076
vadim3 i-1                  333333   30     61.75    57.67  0.934  19.222

add1   x <- x + 1           333333   30     39.29    24.65  0.627   8.218
vadim4 x[i-1]               333333   30    102.33    80.37  0.785  26.790
vadim5 x[i] <- 1.0          333333   30    164.86    86.00  0.522  28.668
vadim6 x[i] <- x[i-1]       333333   30    222.85    93.08  0.418  31.026

frame1 for (i in 1:N) 1    2222222   30      6.92     6.37  0.919  14.148
frame2 0                   2222222   30      0.96     2.15  2.237   4.786
frame3 jit(0|1, TRACE.FLAG 2222222   30      1.97     2.15  1.091   4.774

frame4 for (i in 1:nreps)  2222222   30      0.93     0.92  0.996   2.054
frame5 dnorm no call to ji 2222222   30     14.63    14.63  1.000  32.508
frame6 for (i in 1:N) 1    2222222   30      8.55     6.33  0.741  14.076
-------------------------------------------------------------------------
convolve                       400  100  99525.00  5085.00  0.051   2.034
looped.dnorm                 20000  100   1368.20   137.90  0.101   2.758
while.complex               200000  100    215.51   220.35  1.022  44.070

vadim1 1                    100000  100     55.16    49.92  0.905   4.992
vadim2 i                    100000  100     52.20    56.44  1.081   5.644
vadim3 i-1                  100000  100    119.98    61.30  0.511   6.130

add1   x <- x + 1           100000  100    121.96    30.22  0.248   3.022
vadim4 x[i-1]               100000  100    215.70    87.10  0.404   8.710
vadim5 x[i] <- 1.0          100000  100    429.00    91.44  0.213   9.144
vadim6 x[i] <- x[i-1]       100000  100    626.04   106.90  0.171  10.690

frame1 for (i in 1:N) 1     200000  100     15.82     8.58  0.542   1.716
frame2 0                    200000  100      0.94     2.29  2.439   0.458
frame3 jit(0|1, TRACE.FLAG  200000  100      1.97     2.31  1.173   0.462

frame4 for (i in 1:nreps)   200000  100      0.90     0.93  1.035   0.186
frame5 dnorm no call to ji  200000  100     14.70    14.63  0.995   2.926
frame6 for (i in 1:N) 1     200000  100     18.25     8.50  0.466   1.700
-------------------------------------------------------------------------
convolve                        44  300 896863.64 44272.73  0.049   1.948
looped.dnorm                  2222  300   4100.81   345.63  0.084   0.768
while.complex                22222  300    635.50   644.23  1.014  14.316

vadim1 1                     33333  300     80.10    55.50  0.693   1.850
vadim2 i                     33333  300     82.26    86.10  1.047   2.870
vadim3 i-1                   33333  300    285.48    79.20  0.277   2.640

add1   x <- x + 1            33333  300    356.04    53.94  0.151   1.798
vadim4 x[i-1]                33333  300    536.47   114.18  0.213   3.806
vadim5 x[i] <- 1.0           33333  300   1179.25   115.68  0.098   3.856
vadim6 x[i] <- x[i-1]        33333  300   1769.06   155.52  0.088   5.184

frame1 for (i in 1:N) 1      22222  300     40.14    14.40  0.359   0.320
frame2 0                     22222  300      0.81     2.16  3.467   0.048
frame3 jit(0|1, TRACE.FLAG   22222  300      1.89     2.43  1.313   0.054

frame4 for (i in 1:nreps)    22222  300      0.90     0.90  1.067   0.020
frame5 dnorm no call to ji   22222  300     14.67    14.76  1.006   0.328
frame6 for (i in 1:N) 1      22222  300     44.37    13.41  0.302   0.298

Ra 1.0.5 with jit(2)

is.ra=TRUE  N.OUTER.REPEATS=5  QUICK.FLAG=FALSE  JITFLAG=2

testname                  nrepeats    N      time jittime reltime jittot
                                               us      us       %   secs

convolve                      4000   10   1041.50   111.50  0.107  0.446
looped.dnorm                200000   10    142.58    49.26  0.345  9.852
while.complex              2000000   10     26.02    29.91  1.149 59.812

vadim1 1                    100000   10     43.28    46.76  1.080  4.676
vadim2 i                    100000   10     38.08    42.12  1.106  4.212
vadim3 i-1                  100000   10     45.14    56.54  1.253  5.654

add1   x <- x + 1           100000   10     15.76    23.36  1.482  2.336
vadim4 x[i-1]               100000   10     69.36    77.42  1.116  7.742
vadim5 x[i] <- 1.0          100000   10     88.86    83.32  0.938  8.332
vadim6 x[i] <- x[i-1]       100000   10    107.12    88.14  0.823  8.814

frame1 for (i in 1:N) 1    2000000   10      4.48     5.92  1.321 11.842
frame2 0                   2000000   10      0.97     2.17  2.229  4.338
frame3 jit(0|1, TRACE.FLAG 2000000   10      1.96     2.14  1.094  4.284

frame4 for (i in 1:nreps)  2000000   10      0.93     0.93  1.005  1.866
frame5 dnorm no call to ji 2000000   10     14.68    14.70  1.002 29.404
frame6 for (i in 1:N) 1    2000000   10      6.01     5.84  0.972 11.684
------------------------------------------------------------------------
convolve                      4444   30   9015.75   477.50  0.053  2.122
looped.dnorm                222222   30    415.48    65.19  0.157 14.486
while.complex              2222222   30     68.14    72.24  1.060160.526

vadim1 1                    333333   30     46.26    47.98  1.037 15.994
vadim2 i                    333333   30     41.27    45.20  1.095 15.068
vadim3 i-1                  333333   30     61.97    57.91  0.934 19.304

add1   x <- x + 1           333333   30     39.32    25.16  0.640  8.386
vadim4 x[i-1]               333333   30    102.53    80.65  0.787 26.884
vadim5 x[i] <- 1.0          333333   30    164.92    86.38  0.524 28.792
vadim6 x[i] <- x[i-1]       333333   30    223.10    93.46  0.419 31.154

frame1 for (i in 1:N) 1    2222222   30      6.90     6.43  0.932 14.298
frame2 0                   2222222   30      0.96     2.17  2.253  4.816
frame3 jit(0|1, TRACE.FLAG 2222222   30      1.96     2.15  1.096  4.768

frame4 for (i in 1:nreps)  2222222   30      0.93     0.94  1.012  2.092
frame5 dnorm no call to ji 2222222   30     14.66    14.68  1.001 32.628
frame6 for (i in 1:N) 1    2222222   30      8.63     6.35  0.736 14.118
------------------------------------------------------------------------
convolve                       400  100  99665.00  4495.00  0.045  1.798
looped.dnorm                 20000  100   1371.00   140.20  0.102  2.804
while.complex               200000  100    214.94   219.78  1.023 43.956

vadim1 1                    100000  100     55.24    50.06  0.906  5.006
vadim2 i                    100000  100     52.32    56.38  1.078  5.638
vadim3 i-1                  100000  100    120.26    64.36  0.535  6.436

add1   x <- x + 1           100000  100    121.58    33.32  0.274  3.332
vadim4 x[i-1]               100000  100    215.80    90.06  0.417  9.006
vadim5 x[i] <- 1.0          100000  100    428.70    94.80  0.221  9.480
vadim6 x[i] <- x[i-1]       100000  100    625.96   110.52  0.177 11.052

frame1 for (i in 1:N) 1     200000  100     15.92     8.58  0.539  1.716
frame2 0                    200000  100      0.95     2.35  2.476  0.470
frame3 jit(0|1, TRACE.FLAG  200000  100      1.95     2.28  1.169  0.456

frame4 for (i in 1:nreps)   200000  100      0.89     0.94  1.060  0.188
frame5 dnorm no call to ji  200000  100     14.75    14.72  0.998  2.944
frame6 for (i in 1:N) 1     200000  100     18.39     8.59  0.467  1.718
------------------------------------------------------------------------
convolve                        44  300 897000.00 39272.73  0.044  1.728
looped.dnorm                  2222  300   4099.91   340.23  0.083  0.756
while.complex                22222  300    634.15   641.08  1.011 14.246

vadim1 1                     33333  300     79.86    55.50  0.695  1.850
vadim2 i                     33333  300     82.86    86.40  1.043  2.880
vadim3 i-1                   33333  300    286.44    79.56  0.278  2.652

add1   x <- x + 1            33333  300    354.66    54.96  0.155  1.832
vadim4 x[i-1]                33333  300    537.01   114.66  0.214  3.822
vadim5 x[i] <- 1.0           33333  300   1177.75   116.76  0.099  3.892
vadim6 x[i] <- x[i-1]        33333  300   1767.80   157.26  0.089  5.242

frame1 for (i in 1:N) 1      22222  300     39.87    13.59  0.341  0.302
frame2 0                     22222  300      1.08     1.98  1.900  0.044
frame3 jit(0|1, TRACE.FLAG   22222  300      1.89     2.07  1.143  0.046

frame4 for (i in 1:nreps)    22222  300      0.90     0.81  1.067  0.018
frame5 dnorm no call to ji   22222  300     15.12    14.67  0.971  0.326
frame6 for (i in 1:N) 1      22222  300     44.73    13.68  0.306  0.304

R 2.6.2

"\Program Files\r\R-2.6.2\bin\Rterm" <time-jit-full.R
is.ra=FALSE  N.OUTER.REPEATS=5  QUICK.FLAG=FALSE  JIT.FLAG=1

testname                         nrepeats      N           time   rsd
                                                             us     %

convolve                             4000     10        1446.50   0.3
looped.dnorm                       200000     10         133.40   0.1
while.complex                     2000000     10          30.54   0.0

vadim1 1                           100000     10          47.34   0.3
vadim2 i                           100000     10          41.18   0.3
vadim3 i-1                         100000     10          48.18   0.3

add1   x <- x + 1                  100000     10          17.72   0.9
vadim4 x[i-1]                      100000     10          76.64   0.2
vadim5 x[i] <- 1.0                 100000     10          96.24   0.1
vadim6 x[i] <- x[i-1]              100000     10         141.34   0.1

frame1 for (i in 1:N) 1           2000000     10           6.09   0.1
frame2 0                          2000000     10           1.06   0.6
frame3 jit(0|1, TRACE.FLAG) 0     2000000     10           4.96   0.6

frame4 for (i in 1:nreps) null()  2000000     10           0.91   0.5
frame5 dnorm no call to jit       2000000     10          13.52   0.2
frame6 for (i in 1:N) 1           2000000     10          10.81   0.2
---------------------------------------------------------------------
convolve                             4444     30       12733.57   0.0
looped.dnorm                       222222     30         388.53   0.0
while.complex                     2222222     30          80.54   0.0

vadim1 1                           333333     30          52.82   0.1
vadim2 i                           333333     30          46.54   0.1
vadim3 i-1                         333333     30          68.27   0.2

add1   x <- x + 1                  333333     30          44.23   0.1
vadim4 x[i-1]                      333333     30         115.42   0.0
vadim5 x[i] <- 1.0                 333333     30         179.60   0.1
vadim6 x[i] <- x[i-1]              333333     30         330.05   0.1

frame1 for (i in 1:N) 1           2222222     30          10.92   0.1
frame2 0                          2222222     30           1.05   0.5
frame3 jit(0|1, TRACE.FLAG) 0     2222222     30           4.95   0.1

frame4 for (i in 1:nreps) null()  2222222     30           0.91   0.8
frame5 dnorm no call to jit       2222222     30          13.50   0.1
frame6 for (i in 1:N) 1           2222222     30          15.83   0.1
---------------------------------------------------------------------
convolve                              400    100      141540.00   0.0
looped.dnorm                        20000    100        1284.50   0.0
while.complex                      200000    100         255.07   0.1

vadim1 1                           100000    100          70.48   0.2
vadim2 i                           100000    100          66.30   0.2
vadim3 i-1                         100000    100         138.66   0.1

add1   x <- x + 1                  100000    100         136.98   0.1
vadim4 x[i-1]                      100000    100         249.82   0.0
vadim5 x[i] <- 1.0                 100000    100         470.68   0.0
vadim6 x[i] <- x[i-1]              100000    100         989.94   0.0

frame1 for (i in 1:N) 1            200000    100          28.31   0.2
frame2 0                           200000    100           1.03   4.3
frame3 jit(0|1, TRACE.FLAG) 0      200000    100           4.99   1.5

frame4 for (i in 1:nreps) null()   200000    100           0.94   2.4
frame5 dnorm no call to jit        200000    100          13.54   0.4
frame6 for (i in 1:N) 1            200000    100          34.01   0.3
---------------------------------------------------------------------
convolve                               44    300     1271954.55   0.1
looped.dnorm                         2222    300        3837.98   0.1
while.complex                       22222    300         754.03   0.1

vadim1 1                            33333    300         119.52   0.4
vadim2 i                            33333    300         119.94   0.3
vadim3 i-1                          33333    300         337.98   0.0

add1   x <- x + 1                   33333    300         400.14   0.2
vadim4 x[i-1]                       33333    300         631.99   0.1
vadim5 x[i] <- 1.0                  33333    300        1300.27   0.0
vadim6 x[i] <- x[i-1]               33333    300        2873.73   0.0

frame1 for (i in 1:N) 1             22222    300          76.77   0.8
frame2 0                            22222    300           0.90  35.4
frame3 jit(0|1, TRACE.FLAG) 0       22222    300           4.95   0.0

frame4 for (i in 1:nreps) null()    22222    300           0.99  20.3
frame5 dnorm no call to jit         22222    300          13.50   3.3
frame6 for (i in 1:N) 1             22222    300          83.97   0.5

To Ra homepage