[OpenSCAD] Barnsley Fern recursive
rcmpersiano at gmail.com
Thu Sep 13 13:37:44 EDT 2018
I partially disagree. I don't know the intrinsic processes of OpenSCAD but,
from the running times I got, I deduct that the iterative step of
generating one element of a list in the C-style solution is constant time
in contrast with the linear time the *concat *is done in the tail recursion
elimination strategy due to the successive copies. However, I don't see any
way to write a tail recursion solution to generate a list without resorting
to *concat*. So, tail recursion will be generally less competitive than
iterations for list generations.
Em qui, 13 de set de 2018 às 18:02, Torsten Paul <Torsten.Paul at gmx.de>
> On 09/13/2018 03:14 PM, Eric Buijs wrote:
> > Ronaldo, a nice comparison of iterative vs tail recursive. The latter
> > almost half an hour to finish on my PC, indeed not so efficient. Thanks.
> That is not the fault of the tail recursion elimination. This part is
> pretty much the same as a normal loop. As Ronaldo mentioned the slowness
> comes from the part where it generates the data by copying everything
> for each iteration.
> OpenSCAD mailing list
> Discuss at lists.openscad.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Discuss