[R] parsing speed
Jan T. Kim
jtk at cmp.uea.ac.uk
Tue May 17 13:29:41 CEST 2005
On Tue, May 17, 2005 at 09:50:20AM +0200, Martin Maechler wrote:
> >>>>> "BertG" == Berton Gunter <gunter.berton at gene.com>
> >>>>> on Mon, 16 May 2005 15:20:01 -0700 writes:
>
> BertG> (just my additional $.02) ... and as a general rule
> BertG> (subject to numerous exceptions, caveats, etc.)
>
> BertG> 1) it is programming and debugging time that most
> BertG> impacts "overall" program execution time; 2) this is
> BertG> most strongly impacted by code readability and size
> BertG> (the smaller the better); 3) both of which are
> BertG> enhanced by modular construction and reuseability,
> BertG> which argues for avoiding inline code and using
> BertG> separate functions.
>
> BertG> These days, i would argue that most of the time it is
> BertG> program clarity and correctness (they are related)
> BertG> that is the important issue, not execution speed.
>
> BertG> ... again, subject to exceptions and caveats, etc.
>
> Yes indeed; very good points very well put!
>
> Just to say it again:
>
> **** We strongly recommend not to "inline" your code, but rather
> **** program modularly, i.e. call small `utility' functions.
Generally, I fully agree -- modular coding is good, not only in R.
However, with regard to execution time, modularisation that involves
passing of large amounts of data (100 x 1000 data frames etc.) can
cause problems.
Best regards, Jan
--
+- Jan T. Kim -------------------------------------------------------+
| *NEW* email: jtk at cmp.uea.ac.uk |
| *NEW* WWW: http://www.cmp.uea.ac.uk/people/jtk |
*-----=< hierarchical systems are for files, not for humans >=-----*
More information about the R-help
mailing list