[R] parsing speed

From: Federico Calboli <f.calboli_at_imperial.ac.uk>
Date: Mon 16 May 2005 - 20:46:54 EST


Hi everyone,

I have a question on parsing speed.

I have two functions:

F1
F2

As things are now, F2 calls F1 internally:

F2 = function(x){
if (something == 1){
y = F1(x)
}

if (something ==2){
do whatever

}
}

*Assuming there could be some difference*, is is faster to use the code as written above or should I actually write the statements of F1 to make the parsing faster?

Regards,

Federico Calboli

-- 
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St Mary's Campus
Norfolk Place, London W2 1PG

Tel  +44 (0)20 7594 1602     Fax (+44) 020 7594 3193

f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon May 16 21:02:23 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:46 EST