Skip to content
Snippets Groups Projects
Commit 4d7985d0 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

Merge pull request #622 in G/fastr from...

Merge pull request #622 in G/fastr from ~LUKAS.STADLER_ORACLE.COM/fastr:feature/doc_generic_goals to master

* commit '97ba697b':
  add generic goals to README.md
parents 7b434284 97ba697b
No related branches found
No related tags found
No related merge requests found
# FastR
FastR is an implementation of the [R Language](http://www.r-project.org/) in Java atop [Truffle and Graal](https://github.com/graalvm/).
Truffle is a framework for building self-optimizing AST interpreters.
Graal is a dynamic compiler that is used to generate efficient machine code from partially evaluated Truffle ASTs.
FastR is an implementation of the [R Language](http://www.r-project.org/) in Java atop [Truffle](https://github.com/graalvm/), a framework for building self-optimizing AST interpreters.
FastR is:
* polyglot
..R is very powerful and flexible, but certain tasks are best solved by using R in combination with other programming languages.
..Interfaces to languages, e.g., Java, Fortran and C/C++, incur a significant overhead, which is caused, to a large degree, by the different execution strategies employed by different languages, e.g., compiled vs. interpreted, and by incompatible internal data representations.
..The Truffle framework addresses these issues at a very fundamental level, and builds the necessary polyglot primitives directly into the runtime.
..Consequently, FastR leverages this infrastructure to allow multiple languages to interact transparently and seamlessly.
..All parts of a polyglot application can be compiled by the same optimizing compiler, and can be executed and debugged simultaneously, with little to no overhead at the language boundary.
* efficient
..R is a highly dynamic language that employs a unique combination of data type immutability, lazy evaluation, argument matching, large amount of built-in functionality, and interaction with C and Fortran code.
..Consequently, applications that spend a lot of time in R code often have performance problems.
..Common solutions are to try to apply primitives to large amounts of data at once and to convert R code to a native language like C.
..FastR makes extensive use of the dynamic optimization features provided by the Truffle framework to remove the abstractions that the R language introduces, and can use the Graal compiler to create optimized machine code on the fly.
* compatible
..The hardest challenge for implementations of the R language is the tradeoff between compatibility and performance.
..If an implementation is very compatible, e.g., by using the traditional internal data layout, it cannot perform optimizations that imply a radically different internal structure.
..If an implementation is very efficient, e.g., by adapting internal data structures to the current requirements, it will find it difficult to implement some parts of the GNUR system that are interfacing with applications and packages.
FastR employs many different solution strategies in order to overcome these problems.
It also explores possible solutions at a grander scale, like evolution and emulation of R’s native interfaces.
## Getting FastR
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment