From: Paul K. <pk...@gm...> - 2008-12-29 14:59:30
|
On 29-Dec-08, at 8:40 AM, Knut Franke wrote: > I.e., using array-in-bounds-p in a tight loop on an array of known > dimensions. > Disassembling #'test shows that it contains a dynamic call to > #'array-in- > bounds-p, that I think can and should be optimized away in this case. ARRAY-IN-BOUNDS-P is only used by SBCL in an out of line PCL function. The reason ARRAY-IN-BOUNDS-P isn't optimized at all is simply that it's not used (internally) by anything that's expected to be efficient (e.g. inline array access), and it seems no one yet has complained about its performance. The transformation probably makes sense for arrays of small rank, if only to save space, but is there a practical reason you want ARRAY-IN-BOUNDS-P to be fast? There might be a better way. Paul Khuong |