[R] how much performance penalty does this incur, scalar as a vector of one element?

Jason Liao jg_liao at yahoo.com
Tue Feb 27 19:58:06 CET 2007


Dear Prof.  Tierney, thank you very much to answer my question. It is good to know that the loss of efficiency can be small.

I came to this question after using R to implement a few low level algorithm: KD-tree and recursive algorithm for conditional Poisson binomial. The R's speed has been slow and even much slower than Ruby. 

I love R dearly and always tell my students that it is the best thing that ever happened to statistics. R is much more elegant than C or Fortran. Unfortunately Fortran or C is still needed when speed is a concern and a statistician has then to confront the ugly and complex large world. A huge gain in productivity and reduction in mental anguish can be achieved If R's speed can be improved via compilation.

I did a little research. The following tool claims to make Python as fast as C

http://www-128.ibm.com/developerworks/linux/library/l-psyco.html

Recently, a new Ruby implementation makes it several times faster:

http://www.antoniocangiano.com/articles/2007/02/19/ruby-implementations-shootout-ruby-vs-yarv-vs-jruby-vs-gardens-point-ruby-net-vs-rubinius-vs-cardinal
 
Jason Liao, http://www.geocities.com/jg_liao    
Associate Professor of Biostatistics
Drexel University School of Public Health
245 N. 15th Street, Mail Stop 660
Philadelphia, PA 19102-1192
phone 215-762-3934





 
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check.



More information about the R-help mailing list