[plt-scheme] List loop timing

From: Prabhakar Ragde (plragde at uwaterloo.ca)
Date: Fri Feb 15 14:05:42 EST 2008

Carl Eastlund wrote:
> My point is that removing append is what did something for
> its time, and tail recursion was serendipitous.  The saved time is all
> due to traversal of the list structure, and not due to the stack.

Most (not all) of the saved time is due to avoiding excessive list 
traversal. But without working through the idea of using tail recursion, 
one wouldn't have saved that time. If you insist on measuring the 
savings due to tail recursion as the difference between the 
tail-recursive function and the tail-recursive function spiked by 
putting a trivial operation after each tail call, then, yes, the 
difference is likely negligible. --PR



Posted on the users mailing list.