The goal of this document is to compare the performances of some of the existing packages. See benchmark.Rmd for the details.

We are comparing these packages with collections.

Queue

## Unit: relative
##            expr   min    lq  mean median    uq     max neval
##          dequer  1.00  1.00  1.00   1.00  1.00   1.000   100
##  datastructures  8.63  8.62 25.69   9.03  7.95 104.978   100
##        liqueueR 14.61 14.60 12.35  15.68 13.68   3.771   100
##            base  2.86  2.84  2.42   2.99  2.71   0.753   100
##     collections  1.14  1.16  1.04   1.20  1.12   0.522   100
## Unit: relative
##         expr  min   lq mean median   uq  max neval
##       dequer 1.63 1.67 1.68   1.67 1.67 4.09   100
##         base 4.75 5.19 5.14   5.34 5.92 2.66   100
##  collections 1.00 1.00 1.00   1.00 1.00 1.00   100

Stack

## Unit: relative
##            expr   min    lq  mean median    uq  max neval
##          dequer  1.00  1.00  1.00   1.00  1.00 1.00   100
##  datastructures  9.28 10.24  7.55   8.82  8.75 2.62   100
##        liqueueR 15.29 16.24 11.97  14.92 14.07 3.00   100
##            base  2.68  2.58  2.27   2.46  2.63 1.39   100
##     collections  1.15  1.20  1.23   1.14  1.29 1.34   100
## Unit: relative
##         expr  min   lq mean median   uq  max neval
##       dequer 1.61 1.60 1.53   1.56 1.58 1.16   100
##         base 3.97 4.03 3.90   4.17 4.56 1.88   100
##  collections 1.00 1.00 1.00   1.00 1.00 1.00   100

Deque

## Unit: relative
##         expr  min   lq mean median   uq  max neval
##       dequer 1.00 1.00 1.00   1.00 1.00 1.00   100
##         base 2.98 2.91 3.07   2.93 3.06 1.54   100
##  collections 1.26 1.23 1.33   1.24 1.24 1.17   100
## Unit: relative
##         expr  min   lq mean median   uq   max neval
##       dequer 1.19 1.22 1.24   1.20 1.21 0.984   100
##         base 4.52 4.95 5.05   5.17 5.26 2.798   100
##  collections 1.00 1.00 1.00   1.00 1.00 1.000   100

Priority Queue

## Unit: relative
##            expr   min    lq  mean median    uq   max neval
##        liqueueR 20.26 22.11 19.37  22.44 18.58 10.05   100
##  datastructures  5.98  5.96  5.72   6.56  5.83  2.42   100
##     collections  1.00  1.00  1.00   1.00  1.00  1.00   100

Dict / hashmap

## Unit: relative
##            expr  min   lq mean median    uq   max neval
##  datastructures 6.31 6.28 6.04   6.38 6.592  2.71   100
##            hash 1.04 1.02 1.32   1.02 0.987  4.04   100
##         hashmap 2.92 2.84 3.83   2.89 2.930 27.25   100
##     collections 1.00 1.00 1.00   1.00 1.000  1.00   100

OrderedDict

## Unit: relative
##         expr  min   lq mean median   uq  max neval
##         base 1.31 1.29 1.13   1.29 1.31 0.84   100
##  collections 1.00 1.00 1.00   1.00 1.00 1.00   100
## Unit: relative
##         expr  min   lq mean median   uq  max neval
##         base 3.06 3.13 2.88   3.11 3.03 1.94   100
##  collections 1.00 1.00 1.00   1.00 1.00 1.00   100