[Python-ideas] Idea: Compressing the stack on the fly

Chris Angelico rosuav at gmail.com
Mon May 27 09:32:27 CEST 2013


On Mon, May 27, 2013 at 2:18 PM, Haoyi Li <haoyi.sg at gmail.com> wrote:
> Saying recursion is slower and more memory intensive than iteration (true),
> and thus we shouldn't think about making recursion less slow or less memory
> intensive doesn't really make much sense to me.

Nothing more than a gut feeling, but this sounds like trying to
optimize a bubble sort. Sure, you could write a tighter implementation
that halves the running time, but it's still an inefficient base
method to use, so switching methods will give more benefit.

Actually, the biggest problem I foresee out of this is that it'll make
microbenchmarking a lot harder, which would make debates with jmf 75%
less productive...

Still, it does sound like a fun piece of technology to play with.

ChrisA


More information about the Python-ideas mailing list