Re: [Rd] Pre-compilation and server-side parallel execution

From: Erik van Zijst <>
Date: Sat 09 Dec 2006 - 13:35:19 GMT

Simon Urbanek wrote:
> On Dec 8, 2006, at 9:51 AM, Erik van Zijst wrote:

>> 2. R's native C-api
>> [] does not 
>> separate parsing from evaluation.

N.B. above I mistakenly referred to chapter "The R API", but instead I was referring to what I read in "Linking GUIs and other front-ends to R".

> Actually it does - see "R_ParseVector" and "eval". You're free to run
> the parser once (or even construct the expression directly) and evaluate
> it many times. (Also note that you can serialize the parsed expression
> if desired).

I think I saw that code fragment, but was under the impression that it illustrated how to interact with the R runtime from within a C function that is invoked from R (R -> C -> R), rather than directly from C. I'll certainly explore this further, thanks for pointing this out.

> If your worries are really at this level, then you will have to create
> entirely your own solution, because the overhead of IPC will be way more
> that the time spent in the parser. Actually I'm wondering whether you
> checked it at all, because I'd almost certainly expect the evaluation to
> take way more time than the parsing step. If it does, I'd be inclined to
> think that you have rather a design problem.

Your suspicion is correct Simon, I'm afraid I have not tested anything yet, so I'm not sure my worries are justified at all. I'm also entirely new to R and I'm not a statistician. I'm involved in this project as a systems architect and responsible for choosing a dynamic, programmable evaluation environment. Since it'll be all about financial data analysis (with analysts currently using matlab and stata on the desktop) I studied the area and R surfaced as the most interesting candidate. But as you suggest, before we embark on actual development, I need to verify that integration of R is feasible in this design. I apologize if this yields somewhat elementary questions.

What is your opinion on parallel evaluation of expressions? Is that possible in a single R engine instance, or would I need to create a pool of instances with IPC like R/Apache does?


	"I ain't broke, but I'm badly bent."

______________________________________________ mailing list
Received on Sun Dec 10 01:40:18 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 09 Dec 2006 - 17:30:59 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.