Skip to content
FastR Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
hooks
CODE_OF_CONDUCT.md
Dockerfile
LICENSE
README.md

README.md

FastR Dockerfile

FastR is an implementation of the R Language in Java atop Truffle, a framework for building self-optimizing AST interpreters. FastR is be polyglot, efficient, and compatible. (source)

Docker Automated build Docker Build Status

Build locally

docker build --tag fastr .

Use

docker run --rm -it fastr

# run specific command
docker run --rm -it fastr -e "sessionInfo()"

By default, the Graal compiler is active. You can disable it by defining your own entrypoint and command:

docker run --rm -it --entrypoint mx fastr R

The following shows a comparison of the feature - further tests welcome, see #3

# with Grall compiler (default)
docker run --rm -it fastr -q -e 'install.packages("microbenchmark", quiet = TRUE); cat("Run benchmark...\n"); microbenchmark::microbenchmark("unique list" = { for (i in 1:10000) unique(1:i) }, times = 25, unit = "s")'

Output with Graal compiler:

> install.packages("microbenchmark", quiet = TRUE); cat("Run benchmark...\n"); microbenchmark::microbenchmark("unique list" = { for (i in 1:10000) unique(1:i) }, times = 25, unit = "s")
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Run benchmark...
Unit: seconds
        expr       min        lq     mean    median       uq      max neval
 unique list 0.7662038 0.7964194 1.057809 0.9022891 1.121864 3.433876    25
# without
docker run --rm -it --entrypoint mx fastr R -e 'install.packages("microbenchmark", quiet = TRUE); cat("Run benchmark...\n"); microbenchmark::microbenchmark("unique list" = { for (i in 1:10000) unique(1:i) }, times = 25, unit = "s")'

Output without Graal compiler:

> install.packages("microbenchmark", quiet = TRUE); cat("Run benchmark...\n"); microbenchmark::microbenchmark("unique list" = { for (i in 1:10000) unique(1:i) }, times = 25, unit = "s")
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Run benchmark...
Unit: seconds
        expr      min      lq     mean   median       uq      max neval
 unique list 1.280034 1.38484 1.505686 1.482067 1.551866 2.120451    25

Notice the differences between median/mean and max/min, i.e. the speed up occurring after a longer first execution if using the Graal compiler. The difference gets more obvious with higher repetition numbers (parameter times).

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct (file CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.

License

FastR is available under the GPLv2 license.

Code files in this repository are published under GPLv3 and are Copyright (C) 2017 Daniel Nüst, see LICENSE for the full text of the license.

You can’t perform that action at this time.