|In that case, I'm not sure you get any performance gain since the queue
|has basically the same role as the stack in the recursive version. A
|definitive answer calls for an actual test, though.
The potential gain comes from not incurring function call overhead and only
queueing or stacking the
On Apr 17, 9:39 am, Robert Bossy <[EMAIL PROTECTED]> wrote:
> Gabriel Genellina wrote:
> > En Wed, 16 Apr 2008 17:53:16 -0300, <[EMAIL PROTECTED]> escribió:
>
> >> On Apr 16, 3:27 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>
> >>> Any function can be implemented without recursion, although
Gabriel Genellina wrote:
> En Wed, 16 Apr 2008 17:53:16 -0300, <[EMAIL PROTECTED]> escribió:
>
>
>> On Apr 16, 3:27 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>>
>>
>>> Any function can be implemented without recursion, although it isn't
>>> always easy or fun.
>>>
>>>
>> Rea
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| the 0.409 vs 0.095 is the total times right?
| so the imperative function is >4 times faster than the recursive.
| or what does tottime stand for?
|
| is this always the case that the recursive function is slower?
| the gain is less co
En Wed, 16 Apr 2008 17:53:16 -0300, <[EMAIL PROTECTED]> escribió:
> On Apr 16, 3:27 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
>
>> Any function can be implemented without recursion, although it isn't
>> always easy or fun.
>>
> Really? I'm curious about that, I can't figure out how that w
On Apr 16, 3:27 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> Any function can be implemented without recursion, although it isn't
> always easy or fun.
>
> Jean-Paul
Really? I'm curious about that, I can't figure out how that would
work. Could give an example? Say, for example, the typica
On Wed, 16 Apr 2008 13:18:22 -0700 (PDT), [EMAIL PROTECTED] wrote:
>the 0.409 vs 0.095 is the total times right?
>so the imperative function is >4 times faster than the recursive.
>or what does tottime stand for?
>
>is this always the case that the recursive function is slower?
>the gain is less co
the 0.409 vs 0.095 is the total times right?
so the imperative function is >4 times faster than the recursive.
or what does tottime stand for?
is this always the case that the recursive function is slower?
the gain is less code?
are some functions only implementable recursively?
def power(nbr,