[REBOL] Re: COLLECTing results
From: brett:codeconscious at: 26-Jul-2003 22:26
Romano wrote:
> paren! is usually faster than do block, so i should use paren!
>
> The main difference is that to paren! make a copy of the block, so it uses
> more memory, and if the user uses a reference to the block he can be
fooled:
...
> But changing an executed block is not safe in general.
> So i am not sure about the best solution. I vote for to paren! :-)
I tested the two versions do vs paren and the paren version for the code
that I was using was faster by about 20%, but maybe that was because I
didn't have much of it. I don't know if there is a best solution either
given the different handling in repeat and foreach. So pick what you want!
:^)
Regards,
Brett.