[Ecls-list] Type propagation

Alexander Gavrilov angavrilov at gmail.com
Fri Aug 13 09:35:40 UTC 2010


On Thu, Aug 12, 2010 at 11:12 PM, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:
> On Thu, Aug 12, 2010 at 4:54 PM, Alexander Gavrilov <angavrilov at gmail.com>
> wrote:
>>
>>  (loop for i fixnum from 0 below (- (min (array-total-size arr1)
>>                                          (array-total-size arr2))
>>                                     3) by 4
>
> This is the code that gets normally inlined. Can you try adding the
> following function to the same file and see whether it gets inlined by your
> modified compiler?
> (defun foo (arr1 arr2)
>   (declare (optimize (safety 0) (speed 3)))

OK, it seems that setting safety to 0 makes everything inline. But it
seems strange to me that at safety 1 array accesses are already
inlined without any bound checks, while relatively harmless arithmetic
is still done via function calls...

Alexander




More information about the ecl-devel mailing list