Re: Strange Execution Times

2005-05-27 Thread John Machin
Elliot Temple wrote: > > On May 26, 2005, at 3:22 PM, John Machin wrote: > >> >> Then post your summarised results back to the newsgroup for the >> benefit of all -- there's this vague hope that folk actually read >> other peoples' posts before firing off questions :-) > > > Here is my new

Re: Strange Execution Times

2005-05-26 Thread Elliot Temple
On May 26, 2005, at 3:22 PM, John Machin wrote: > > Then post your summarised results back to the newsgroup for the > benefit of all -- there's this vague hope that folk actually read > other peoples' posts before firing off questions :-) Here is my new version. It runs in about .65 seconds.

Re: Strange Execution Times

2005-05-26 Thread Peter Hansen
John Machin wrote: > Then post your summarised results back to the newsgroup for the benefit > of all -- there's this vague hope that folk actually read other peoples' > posts before firing off questions :-) +1 QOTW :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Strange Execution Times

2005-05-26 Thread John Machin
Elliot Temple wrote: [copying Elliot's e-mail reply back to the list because it's educational and scarcely private] > > > > On 5/26/05, John Machin <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > > > I am running two functions in a row that do the same thing. > > > > 1. I

Re: Strange Execution Times

2005-05-26 Thread Elliot Temple
hey FYI i found the problem: i accidentally copied an output file for my test data. so all the passwords were exactly 32 chars long. so when replacing them with new 32 char passwords, it went much much faster, I guess because the list kept the same number of chars in it and didn't have to copy l

Re: Strange Execution Times

2005-05-26 Thread John Machin
[EMAIL PROTECTED] wrote: > I am running two functions in a row that do the same thing. 1. I see no functions here. You should set out a script like this: def main(): your_code_goes_here() if __name__ == '__main__': main() for two reasons (a) your code will be referring to locals inst

Re: Strange Execution Times

2005-05-26 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: >I am running two functions in a row that do the same thing. One runs > in .14 seconds, the other 56. I'm confused. I wrote another version > of the program and couldn't get the slow behavior again, only the fast. > I'm not sure what is causing it. Can anyone figure

Strange Execution Times

2005-05-25 Thread curi42
I am running two functions in a row that do the same thing. One runs in .14 seconds, the other 56. I'm confused. I wrote another version of the program and couldn't get the slow behavior again, only the fast. I'm not sure what is causing it. Can anyone figure it out? Here is my code (sorry it