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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

§ 2.4 LMI Lambda 43<br />

2.4.2 <strong>Performance</strong> Issues<br />

The Lambda derives much <strong>of</strong> its performance from its stack cache, a bank<br />

<strong>of</strong> fast memory acting as a specialized top-<strong>of</strong>-stack cache. The contents <strong>of</strong> this<br />

cache are managed by the microcode to contain the contents <strong>of</strong> the top <strong>of</strong> the<br />

control stack for the current stack group. The frame <strong>of</strong> the currently executing<br />

function is always resident in the stack cache, <strong>and</strong> references to elements <strong>of</strong> the<br />

frame (arguments, local variables, temporary values, or frame header words) are<br />

made by indexing <strong>of</strong>f a frame pointer held in a special register. The stack level is<br />

checked on function entry <strong>and</strong> exit <strong>and</strong> adjusted as necessary by moving words to<br />

or from the stack image in main memory.<br />

2.4.3 Function Calling<br />

The Lambda uses an inverted function-calling sequence that eliminates the<br />

need to copy pieces <strong>of</strong> stack around during normal execution. A function call starts<br />

with a ‘CALL’ instruction, which builds a frame header, <strong>and</strong> then the arguments<br />

are pushed. The last argument is pushed to a special destination, which causes<br />

the function to be invoked. This can immediately push any local variables <strong>and</strong><br />

temporaries <strong>and</strong> begin execution. The result <strong>of</strong> the function is pushed to another<br />

destination, which causes the frame to be popped <strong>and</strong> the value to be transmitted.<br />

Many Common <strong>Lisp</strong> functions are implemented in microcode on the LMI<br />

Lambda. Conventional machines implement logically primitive operations such<br />

as ASSQ, ASSOC, MEMQ, MEMBER, property list manipulation, or BIGNUM<br />

arithmetic in macrocode or <strong>Lisp</strong>. In the Lambda, these functions are implemented<br />

in microcode.<br />

The data/instruction cache in the Lambda speeds up typical <strong>Lisp</strong> execution<br />

by about 30%. Most <strong>of</strong> the benefit comes from faster macroinstruction fetching<br />

(the stack cache eliminates most data references to memory). The cache is a<br />

physical-address write-through design <strong>and</strong> achieves an LMI-estimated 85% hit<br />

rate. Using a two-level mapping scheme, virtual address translation proceeds<br />

in parallel with cache hit detection. There are a number <strong>of</strong> improvements to<br />

be made in the operation <strong>of</strong> the cache, including the use <strong>of</strong> block-mode NuBus<br />

memory cycles for cache updating in regions with high locality <strong>of</strong> reference; the<br />

benchmark figures do not reflect these enhancements.<br />

The <strong>Lisp</strong> Machine uses CDR-coding to represent list structure efficiently. Two

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

Saved successfully!

Ooh no, something went wrong!