in reply to What is the fastest pure-Perl implementation of XXX?
3. As the aforementioned node demonstrated, tail call recursion isn't all that fast in the current perl5. Speeding it up probably requires hacking on the core. If you need to compute factorials repeatedly in a recursive fashion, consider using memoization. Memoization builds a lookup table that could even beat the iterative scheme in certain situations.
-Mark
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: What is the fastest pure-Perl implementation of XXX?
by tilly (Archbishop) on Mar 31, 2004 at 05:39 UTC | |
by kvale (Monsignor) on Mar 31, 2004 at 08:10 UTC | |
by tilly (Archbishop) on Mar 31, 2004 at 18:52 UTC | |
by kvale (Monsignor) on Mar 31, 2004 at 20:20 UTC |