[R] Python and R

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Wed Feb 18 13:24:19 CET 2009


2009/2/17 Esmail Bonakdarian <esmail.js at gmail.com>:

> Well, I have a program written in R which already takes quite a while
> to run. I was
> just wondering if I were to rewrite most of the logic in Python - the
> main thing I use
> in R are its regression facilities - if it would speed things up. I
> suspect not since
> both of them are interpreted, and the bulk of the time is taken up by
> R's regression
> calls.

 - and the bulk of the time in the regression calls will be taken up
by C code in the underlying linear algebra libraries (lapack, blas,
atlas and friends).

 Your best bet for optimisation in this case would be making sure you
have the best libraries for your architecture. That's a bit beyond me
at the moment, others here can probably tell you about getting the
best performing library for your system.

 This can also speed up Python (scipy or numpy) code that uses the
same libraries.

Barry




More information about the R-help mailing list