Re: Lexical variables, scratchpads, closures, ...
by Melvin Smith other posts by this author
Aug 2 2002 4:41PM messages near this date
Re: Lexical variables, scratchpads, closures, ...
|
Re: Lexical variables, scratchpads, closures, ...
At 08:50 AM 8/2/2002 -0700, Sean O'Rourke wrote:
> Without performance numbers, this is hard to test, but it can potentially
> turn a single "a = b + c", which is just "add P0, P1, P2" if a, b, and c
> have been referenced, into a hideous five instructions:
>
> fetch_lex P0, 'a' # Because how we store result depends on a's type
> fetch_lex P1, 'b'
> fetch_lex P2, 'c'
> add P0, P1, P2
> store_lex P0, 'a'
The last instruction (store_lex) isn't needed since P0 is a pointer to the
lexical.
-Melvin
Thread:
Jerome Vouillon
Melvin Smith
Jerome Vouillon
Sean O'Rourke
Jerome Vouillon
Dan Sugalski
Dan Sugalski
Simon Cozens
Nicholas Clark
Sean O'Rourke
Jerome Vouillon
Nicholas Clark
Jerome Vouillon
Jonathan Sillito
Dave Mitchell
Melvin Smith
Sean O'Rourke
Dan Sugalski
Dan Sugalski
Jonathan Sillito
Jerome Vouillon
Melvin Smith
Jerome Vouillon
Melvin Smith
Jerome Vouillon
Jonathan Sillito
Sean O'Rourke
|