Re: Fast recursive generators?

2011-10-29 Thread 88888 Dihedral
I am thinking the bye code compiler in python can be faster if all known immutable instances up to the executionare compiled immutable objects to be assigned. -- http://mail.python.org/mailman/listinfo/python-list

Re: Fast recursive generators?

2011-10-28 Thread Gabriel Genellina
En Fri, 28 Oct 2011 15:10:14 -0300, Michael McGlothlin escribió: I'm trying to generate a list of values where each value is dependent on the previous value in the list and this bit of code needs to be repeatedly so I'd like it to be fast. It doesn't seem that comprehensions will work as each

Re: Fast recursive generators?

2011-10-28 Thread Terry Reedy
On 10/28/2011 8:49 PM, Michael McGlothlin wrote: Better to think of a sequence of values, whether materialized as a 'list' or not. The final value will actually be a string but it seems it is usually faster to join a list of strings than to concat them one by one. .join() takes an iterable o

Re: Fast recursive generators?

2011-10-28 Thread Michael McGlothlin
>> I'm trying to generate a list of values > > Better to think of a sequence of values, whether materialized as a 'list' or > not. The final value will actually be a string but it seems it is usually faster to join a list of strings than to concat them one by one. >> where each value is dependent

Re: Fast recursive generators?

2011-10-28 Thread Terry Reedy
On 10/28/2011 2:10 PM, Michael McGlothlin wrote: I'm trying to generate a list of values Better to think of a sequence of values, whether materialized as a 'list' or not. where each value is dependent on the previous value in the list and this bit of code needs to be repeatedly so I'd like

Fast recursive generators?

2011-10-28 Thread Michael McGlothlin
I'm trying to generate a list of values where each value is dependent on the previous value in the list and this bit of code needs to be repeatedly so I'd like it to be fast. It doesn't seem that comprehensions will work as each pass needs to take the result of the previous pass as it's argument. m