[REBOL] Re: order of evaluating expressions..
From: rotenca:telvia:it at: 24-Dec-2004 13:34
Peter WA Wood wrote:
>Is it really a significant slow down?
>
Yes.
I often read this question about Rebol, my answer is always Yes. Rebol
is slow by itself, if you slow it with an avoidable
programming style, you are not doing the right thing. There are many of
this cases in Rebol, the combinations of them can lead to a slow
program. Often i see program which can become 30-50% faster only using
the right syntax.
This is a 50-60% gain example with the combination of 4 "Is it really a
significant slow down?" cases:
0:00:00.375 [out: copy [] insert tail out to string! 4 * 5 + 3 * 6]
0:00:00.578 [append out: copy [] to-string ((4 * 5) + 3) * 6]
Sometime this difference is negligible, sometime is the difference
between an usable and an unusable program.
And what is negligible today, will be not negligible tomorrow, when
you'll add other features and functions to your program.
There is an important difference between the syntax of compiled language
and interpreted one: in the first case, the compiler can do many
optimizations at compile time and you can write code in a more relaxed
way; in the second case, all you write will be read and executed "as is"
at run time. The programmer is also the optimizer.
--
Ciao
Romano Paolo Tenca