TerraでRの拡張を書く話

TerraというLuaベースの言語がある。
http://terralang.org/
で、Rの拡張を書く際にC++とかCとか使う代わりにこのTerraを使うという話をしている人がいる。
http://people.mozilla.com/~sguha/blog/2013/05/21/Terra-and-R-Is-Terrific.html

My reasons for investigating TerraLang is to find an extension language for R that has good performance characteristics. The current choice is C++ (using Rcpp) or Java (using rJava). Both languages are performant and in many cases, provide orders of speed improvement over the R language. However, I don’t recommend either for the general R programmer. I have seen too many segfaults, R programmers fighting with pointers, and the verbosity of Java

Lua on the other hand is a very simple language to learn. LuaJIT is a blazing fast implementation of Lua (though one has to program idiomatically). And TerraLang can compile terra functions to machine code (via LLVM). Moreover, one can write macros in TerraLang to produce code-driven-code!

C++はセグフォ辛いしJavaは冗長だ、ってことでTerra(Lua)らしい。
バブルソートの実装でRcppを使った場合の結果との比較も掲載されており、中央値でみてRcppの2倍速くなっている。
ちなみにこの人モジラのデータサイエンティスト。
Rhipeの作者でもある。
https://github.com/saptarshiguha/