library(RLLVMCompile)
f = function(x) x + 1L
mod = Module()
fc = compileFunction(f, Int32Type, Int32Type, module = mod)
g = function(x) sapply(x, f)
gc = compileFunction(g, getSEXPType("INT"), getSEXPType("INT"), module = mod)
.llvm(fc, 1)
.llvm(gc, 1:10)
ee = ExecutionEngine(mod)
tm = system.time(replicate(1e5, .llvm(fc, 1L)))
tm = system.time(replicate(1e5, .llvm(fc, 1L, .ee = ee)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.