Number: 1785

Date:  9-Aug-84 17':09':56

Submitter: Sannella.PA

Source: kaplan.pa

Subject: \ADDBASE2 should be an opcode

Assigned To: 

Attn: 

Status: Declined

In/By: 

Problem Type: Performance

Impact: Moderate

Difficulty: 

Frequency: 

Priority: Perhaps

System: Language Support

Subsystem: Microcode

Machine: 

Disk: 

Lisp Version: 

Source Files: 

Microcode Version: 

Memory Size: 

File Server: 

Server Software Version: 

Disposition: [I guess I wasn''t clear in my msgs -- I think this is a *bad idea* unless it is part of a larger opcode set redesign or we have some important cases where ADDBASE2 would make a performance difference. For 3 out of 4 of the configurations we support, there is no room in the microcode for frills and "it would be nice''s"]'
["masinter" "23-Aug-84 15':43':23" Attn': Status':(Open->Declined) Disposition':]

Description: '
Date':  9 Jul 84 19':04 PDT'
From': masinter.pa'
Subject': GETTOPVAL 50% faster'
To': lispsupport'
cc': jonl, kaplan'
'
I made GETTOPVAL and friends 50% faster by changing the explicit (COND ((LITATOM --))) check to be a \DTEST and also changing '
the open coded \ADDBASE2 to be an'
(\ADDBASE base (UNFOLD cell WORDSPERCELL))'
'
The latter would be slower for litatoms > 2↑15 once we had such, but still possibly tolerable. '
'
I thought it *was* written that way once, and wonder who changed it to make it slower.'
'
(User complained that GETTOPVAL took a lot of time in his code according to stats.)'
'
-----'
'
From': kaplan.pa'
Date':  9-Jul-84 20':58':11 PDT'
Subject': Re': GETTOPVAL 50% faster'
In-reply-to': masinter''s message of 9 Jul 84 19':04 PDT'
To': masinter'
cc': lispsupport, jonl, kaplan'
'
I think \ADDBASE2 should be an opcode--particularly when me move to cell addressing.'
'
--Ron'
'
-----'
'
Date':  9 JUL 84 21':38 PDT'
From': MASINTER.PA'
Subject': ADDBASE2'
To':   kaplan, jonl, lispsupport, vanmelle'
'
it is pretty simple to add an optimization to the compiler to turn'
'
(ADDBASE X (LLSH Y 1)) into'
(ADDBASE2 X Y) when we get microcode for ADDBASE2. '
'
(Also X Y ADDBASE Y ADDBASE for Y a variable, although not quite as easy.)'


Workaround: 

Test Case: 

Edit-By: masinter

Edit-Date: 23-Aug-84 15':43':25