Proper tail recursion
Christopher T King
squirrel at WPI.EDU
Wed Jul 7 19:19:00 EDT 2004
Poking around in ceval.c, I discovered the PREDICT macros, and plan to
make a preliminary implementation of tail calls using a similar test (use
tail code call for any CALL_FUNCTION followed by a RETURN_VALUE). But I
was just wondering, is there any reason why LOAD_CONST and friends don't
check for a following RETURN_VALUE to avoid the push/loop/pop cycle and
rather simply return the value?
More information about the Python-list
mailing list