The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

crbcc

crbcc is an R package that compiles R code to bytecode using a C implementation. It is intended as a fast, drop-in alternative to the base compiler package, for cases in which a reduced compilation time could be beneficial, eg. in research. However using crbcc for minor performance improvements inside R’s JIT pipeline is also possible.

This project was developed as part of a bachelor’s thesis at FIT CTU.

Acknowledgement

When possible, crbcc mirrors the architecture and logic used in the original GNU-R compiler package by Luke Tierney. The original compiler Noweb document is available at https://homepage.cs.uiowa.edu/~luke/R/compiler/compiler.pdf, or distributed as an R base package, available under the GPL-2 license. Most documentation provided in the document is relevant to crbcc as well.

Features

Interface

Requirements

Install

From source (local checkout)

R CMD INSTALL .

or with the provided Make target:

make install

Quick Start

library(crbcc)

f <- function(x) {
  y <- x + 1
  y * 2
}

cf <- cmpfun(f, options = list(optimize = 2))
cf(10)

Compile an R file

library(crbcc)

cmpfile("script.R", "script.Rc")
loadcmp("script.Rc", envir = .GlobalEnv)

Compiler options

The compiler accepts options as a named list:

Example:

opts <- list(
  optimize = 2,
  suppressAll = FALSE,
  suppressUndefined = c("pi", "letters")
)

cf <- cmpfun(function(x) x + pi, options = opts)

Contributing

Contributions are welcome.

R CMD check .

Known limitations

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.