[gambit-list] Proposed patch
Marc Feeley
feeley at iro.umontreal.ca
Mon Dec 16 15:17:22 EST 2013
On Dec 15, 2013, at 2:11 PM, Bradley Lucier <lucier at math.purdue.edu> wrote:
> This got bounced the first time.
>
> On 12/15/2013 12:47 PM, Bradley Lucier wrote:
>>
>> On 12/15/2013 11:56 AM, Marc Feeley wrote:
>>> Your patch is now applied and on the repo. I have also added inlining of ##flsquare.
>>
>> Thanks. (It took me a few minutes to understand that I needed to "make bootstrap" after the changes.)
>>
>> The compiler should probably expand
>>
>> (square x)
>>
>> as
>>
>> (cond ((##fixnum? x)
>> (cond ((##eq? x 0) 0)
>> ((##fixnum.*? x x)
>> => values)
>> (else
>> (##square x)))
>> ((##flonum? x)
>> (##flsquare x))
>> (else
>> (##square x))
>>
>> and similarly for flsquare. And similarly for conjugate.
>>
>> Brad
I added ##fxsquare and ##fxsquare? and the speculative inlining of square based on those functions.
How important is it to speculatively inline conjugate ? It seems to be a very special purpose function. Are there computationally heavy numerical functions that would be slow if it was not inlined?
Marc
More information about the Gambit-list
mailing list