Paul Hiemstra
Paul Hiemstra

Reputation: 60964

R 2.14 byte compilation - how much performance increase

I saw that the latest R version supports byte compilation. What is the performance gain I can expect? And are specific tasks more positively impacted that others?

Upvotes: 9

Views: 814

Answers (2)

Dirk is no longer here
Dirk is no longer here

Reputation: 368439

It is a good question:

  • The byte compiler appeared with 2.13.0 in April, and some of us run tests then (with thanks to gsk3 for the links).

  • I tend to look more at what Rcpp can do for us, but I now always include 'uncompiled R' and 'byte compiled R' as baselines.

  • I fairly often see gains by a factor of two (eg the varSims example) but also essentially no gains at all (the fibonacci example which is of course somewhat extreme).

We could do with more data. When we had the precursor byte compile in the Ra engine by Stephen Milborrow (which I had packaged up for Debian too), it was often said that both algebraic expression and loops benefited. I don't know of a clear rule for the byte compiler by Luke Tierney now in R---but it generally never seems to hurt so it may be worthwhile to get into the habit of turning it on.

Upvotes: 9

Related Questions