23.03.2013 Views

Performance and Evaluation of Lisp Systems - Dreamsongs

Performance and Evaluation of Lisp Systems - Dreamsongs

Performance and Evaluation of Lisp Systems - Dreamsongs

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

§ 3.5 Takr 111<br />

where CPU time is the EBOX time (no memory reference time included), elapsed<br />

time is real time, wholine time is EBOX + MBOX (memory reference) times, GC<br />

time is garbage collector time, <strong>and</strong> the load averages are given before <strong>and</strong> after<br />

the timing run. All times are in seconds, <strong>and</strong> the load average is the exponentially<br />

weighted, over time, average <strong>of</strong> the number <strong>of</strong> jobs in all runnable queues. With<br />

no load, wholine <strong>and</strong> elapsed times are the same.<br />

On TAKR with no load the result on SAIL (KL-10A) was<br />

CPU time = 0.602<br />

elapsed time = 1.02<br />

wholine time = 1.02<br />

gc time = 0.0<br />

load average before = 0.27<br />

load average after = 0.28<br />

which shows a 36% degradation. The question is how well these 100 functions<br />

destroy the effect <strong>of</strong> the cache on SAIL. The answer is that it does not destroy the<br />

effect very much. This makes sense because the total number <strong>of</strong> instructions for<br />

100 copies <strong>of</strong> the function is about 3800, <strong>and</strong> the cache holds about 2000 words.<br />

Here is the result for the single function TAK ′ run on SAIL with the cache shut <strong>of</strong>f:<br />

CPU time = 0.6<br />

elapsed time = 6.95<br />

wholine time = 6.9<br />

gc time = 0.0<br />

load average before = 0.036<br />

load average after = 0.084<br />

which shows a factor <strong>of</strong> 9.2 degradation. The 100-function version ran in the same<br />

time within a few percent.<br />

Hence, in order to destroy the effect <strong>of</strong> a cache, one must increase the size <strong>of</strong><br />

the code significantly beyond the size <strong>of</strong> the cache. Also, the distribution <strong>of</strong> the<br />

locus <strong>of</strong> control must be roughly uniform or r<strong>and</strong>om.<br />

More important to most implementations, though, is that the tail recursion is<br />

no longer guaranteed to be a call from a function to itself, <strong>and</strong> many implementa-<br />

tions do not do tail recursion removal when the call is not to that same function.<br />

That is, <strong>of</strong>ten a compiler will implement tail recursion removal by transforming a<br />

function that calls itself to one that does a GO to the head <strong>of</strong> the function. Of<br />

course, the function has to be converted to a PROG equivalent <strong>of</strong> itself as well.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!