Number: 169

Date: 18-Mar-84 15':50':21

Submitter: Sannella.PA

Source: MASINTER.PA

Subject: Compiler should coerce constant args to floating fns.

Assigned To: masinter.pa

Attn: 

Status: Closed

In/By: 

Problem Type: Performance

Impact: 

Difficulty: 

Frequency: 

Priority: Absolutely

System: Language Support

Subsystem: Compiler, Code Format

Machine: 

Disk: 

Lisp Version: 

Source Files: 

Microcode Version: 

Memory Size: 

File Server: 

Server Software Version: 

Disposition: '
[Date': 20 Mar 84 12':00 PST'
From': masinter.pa'
Subject': more ARs'
To': LispSupport'
cc': masinter.pa'
...AR#169': status← Fixed (today)]'
["Sannella" "20-Aug-84 17':53':52" Attn': Status':(Fixed->Closed)]

Description: '
Date': 18 MAR 84 00':54 PST'
From': MASINTER.PA'
Subject': Please submit AR': want compiler to coerce constant args to floating fns. to floatp'
To':   LispSupport'
cc':   JonL'
'
Currently compiled code for (FPLUS X 3) and the like emit a fixed-point 3 as the arg to the FPLUS opcode.'
'
Unless the floating microcode on our machines is extended, this is much slower than if the compiler emitted (FPLUS X 3.0).'
'
(I don''t know if the ''fix'' is to require more microcode to auto-float the arguments or to change the compiler. I suspect the fix is to extend the microcode, at least on Dorado and DLion.)'
-----'
Date': 20 MAR 84 00':12 PST'
From': MASINTER.PA'
Subject': BYTECOMPILER coerce constant args'
To':   JonL'
cc':   LispSupport'
'
I made the fix to BYTECOMPILER but haven''t recompiled it or tested. The change was in COMP.NUMERIC. I fixed it that it would coerce args to numeric functions, e.g.'
'
(IPLUS x 3.5) would compile as (IPLUS X 3) while (FPLUS x 3) would compile as (FPLUS x 3.0).'
'
Some of this had been working before, e.g., (FPLUS x 2 1) would have compiled as (FPLUS x 3.0).'
'
As I type this I realize that there are more cases to handle, so wait a bit before testing.'


Workaround: 

Test Case: 

Edit-By: Sannella

Edit-Date: 20-Aug-84 17':53':53