Re: Use of generators and efficiency

2008-09-17 Thread Tim Chase
To my great surprise, this approach was often considerably _slower_ to complete than the original program (up to ~40% depending on which modifiers were used), despite producing initial results more quickly. You may be interested in reading through this thread http://mail.python.org/pipermail/

Use of generators and efficiency

2008-09-17 Thread John O'Hagan
Hi, I'm writing a Python program using combinatorial algorithms to generate music. It originally was of this general form: First, a combinatorial function producing a list of sub-lists, then: For each sub-list in the list: Filter/modifier A, then append modified sub-list to new list,