Skip to Content
R Programming By Example
book

R Programming By Example

by Omar Trejo Navarro
December 2017
Beginner to intermediate
470 pages
12h 29m
English
Packt Publishing
Content preview from R Programming By Example

Just-in-time (JIT) compilation of R code

R also supports Just-in-time (JIT) compilation. When JIT compilation is enabled, R will automatically byte code compile any code that is executed without explicitly having called one of the compile functions. To activate JIT compilation, use the enableJIT() function.

The level argument tells R how much code to compile before execution; 0 disables JIT, 1 compiles functions before their first use, 2 also compiles functions before they are duplicated, and 3 also compiles loops before they are executed:

library(compiler)
enableJIT(level = 3)
JIT compilation can also be enabled by setting the R_ENABLE_JIT environment in the operating system before starting R. The value of R_ENABLE_JIT should be set to the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Efficient R Programming

Efficient R Programming

Colin Gillespie, Robin Lovelace
R Programming

R Programming

Jared P. Lander

Publisher Resources

ISBN: 9781788292542Supplemental Content