Re: rewrite for achieving speedup

2007-04-17 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > why would binding to a function-local name speeds up performance? Like any other constant-hoisting, pulling the lookup out of the loop speeds things up because otherwise Python must repeat the lookup each time through the loop (Python doesn't _know_

Re: rewrite for achieving speedup

2007-04-17 Thread [EMAIL PROTECTED]
On Apr 17, 11:25 pm, Steven Bethard <[EMAIL PROTECTED]> wrote: > Steve Holden wrote: > > Johnny Blonde wrote: > >> Hello Group! > > >> I really tried hard for two hours to rewrite the following expression > >> (python 2.4): > >> -- > >> teilnehmer = [] > >> for r in Reisen.s

Re: rewrite for achieving speedup

2007-04-17 Thread Johnny Blonde
thanks steve h., works like this just perfectly! steve b.: for the next time if i cannot figure it out i will just do it like this! thanks a lot guys, Frank -- http://mail.python.org/mailman/listinfo/python-list

Re: rewrite for achieving speedup

2007-04-17 Thread Steven Bethard
Steve Holden wrote: > Johnny Blonde wrote: >> Hello Group! >> >> I really tried hard for two hours to rewrite the following expression >> (python 2.4): >> -- >> teilnehmer = [] >> for r in Reisen.select(AND(Reisen.q.RESVON <= datum, Reisen.q.RESBIS >>> = datum)): >> for

Re: rewrite for achieving speedup

2007-04-17 Thread Steve Holden
Johnny Blonde wrote: > Hello Group! > > I really tried hard for two hours to rewrite the following expression > (python 2.4): > -- > teilnehmer = [] > for r in Reisen.select(AND(Reisen.q.RESVON <= datum, Reisen.q.RESBIS >> = datum)): > for g in r.BUCHUNGEN: >

rewrite for achieving speedup

2007-04-17 Thread Johnny Blonde
Hello Group! I really tried hard for two hours to rewrite the following expression (python 2.4): -- teilnehmer = [] for r in Reisen.select(AND(Reisen.q.RESVON <= datum, Reisen.q.RESBIS >= datum)): for g in r.BUCHUNGEN: for t in g.aktiveTeilnehmer: