From simon.urbanek at r-project.org  Fri Dec  8 23:28:07 2006
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Fri, 8 Dec 2006 17:28:07 -0500
Subject: [Rd] Pre-compilation and server-side parallel execution
In-Reply-To: <45797BFB.3090302@erik.prutser.cx>
References: <45797BFB.3090302@erik.prutser.cx>
Message-ID: <79ACB4C7-436F-414A-AAE5-07C04B6FE5EF@r-project.org>


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

> 2. R's native C-api
> [http://cran.r-project.org/doc/manuals/R-exts.html#The-R-API] does  
> not separate parsing from evaluation.

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).

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.

Cheers,
Simon



[Rd] Pre-compilation and server-side parallel execution
Simon Urbanek