On Mon, Oct 10, 2005 at 12:20:13AM +0100, Tom Anderson wrote:
> What puzzles me, though, are bytecodes 17, 39 and 42 - surely these aren't 
> reachable? Does the compiler just throw in a default 'return None' 
> epilogue, with routes there from every code path, even when it's not 
> needed? If so, why?
I think the short answer is "yes".  They're unreachable, and they're thrown in
by default.

It's possible that this could be fixed with a slightly smarter compiler, but
the performance difference is likely to be in the noise.  What's one cache miss
(because the bytecode is slightly larger) compared to the total cycles used
in, say, the LOAD_GLOBAL 'fib'?

My bet is that this optimization would not pay off in measurable run-time
gains.

Jeff

Attachment: pgpPYgLkYVBPg.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to