Re: A question about osyco

2008-01-28 Thread iu2
On Jan 29, 1:48 am, [EMAIL PROTECTED] wrote: > Marc 'BlackJack' Rintsch: > > > Try calling the iterative one twice and measure the time of the second > > call.  IIRC psyco needs at least one call to analyze the function, so the > > first call is not speed up. > > That's how Java HotSpot works, but

Re: A question about osyco

2008-01-28 Thread bearophileHUGS
Marc 'BlackJack' Rintsch: > Try calling the iterative one twice and measure the time of the second > call. IIRC psyco needs at least one call to analyze the function, so the > first call is not speed up. That's how Java HotSpot works, but Psyco is very different from HotSpot, and I think you are

Re: A question about osyco

2008-01-28 Thread Marc 'BlackJack' Rintsch
On Mon, 28 Jan 2008 05:31:41 -0800, iu2 wrote: > I wrote two version of a fib functions, a recursive one and an > iterative one. > Psyco improved a lot the recursive function time, but didn't affect at > all the iterative function. > > Why? Try calling the iterative one twice and measure the tim

A question about osyco

2008-01-28 Thread iu2
Hi guys, I wrote two version of a fib functions, a recursive one and an iterative one. Psyco improved a lot the recursive function time, but didn't affect at all the iterative function. Why? Here is the code: import time, psyco def mytime(code): t = time.time() res = eval(code) del