Re: row-major-aref

"Tim Bradshaw (as tfb at cley dot com)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
I generally can't declare the rank as it's not known at compile time, but I will add an option that lets you specify the rank which can then be used if it's a literal.

> On 28 Nov 2025, at 18:48, Martin Simmons <[email protected]> wrote:
> 
> But there is a bug that makes it generate the wrong code if the array rank is
> unknown :-(
> 
> It works if you can declare the rank, e.g. (simple-array t 2) instead of
> (simple-array t *).
> 
> --
> Martin Simmons
> LispWorks Ltd
> http://www.lispworks.com/
> 
> 
> 
>>>>>> On Fri, 28 Nov 2025 18:21:09 GMT, Martin Simmons said:
>> 
>> Yes, (safety 0).
>> 
>> --
>> Martin Simmons
>> LispWorks Ltd
>> http://www.lispworks.com/
>> 
>> 
>> 
>>>>>> On Fri, 28 Nov 2025 17:54:06 +0000, Tim Bradshaw (as tfb at tfeb dot org) said:
>>> 
>>> I am an idiot.  I think the answer is (safety 0) (which I am fine with)
>>> 
>>>>> On 28 Nov 2025, at 17:49, Tim Bradshaw (as tfb at tfeb dot org) <[email protected]> wrote:
>>>>> 
>>>>> Hi, what should I do to make row-major-aref fast (and is it in fact significantly slower than plain aref)?  My intuition is that it should be faster if anything, since it has less sums to do.
>>>>> 
>>>>> Right now my arrays have (simple-array <good-element-type> *) declarations.  The index has a good type.
>>>>> 
>>>>> --tim
>>>>> 
>>>>> _______________________________________________
>>>>> Lisp Hug - the mailing list for LispWorks users
>>>>> [email protected]
>>>>> http://www.lispworks.com/support/lisp-hug.html
>>> 
>>> 
>>> _______________________________________________
>>> Lisp Hug - the mailing list for LispWorks users
>>> [email protected]
>>> http://www.lispworks.com/support/lisp-hug.html
>>> 
>> 
> 
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> [email protected]
> http://www.lispworks.com/support/lisp-hug.html

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.