Re: array-ref and array-set! (was Re: Some reshape operators are affine, should they be in this SRFI?)
Bradley Lucier 05 May 2020 02:10 UTC
On 5/4/20 5:20 PM, John Cowan wrote:
> On Mon, May 4, 2020 at 2:39 PM Bradley Lucier <xxxxxx@purdue.edu
> <mailto:xxxxxx@purdue.edu>> wrote:
>
> So if the difference is 0.348399 versus 0.896669 for using
>
> (let ((A_ (array-getter A))) ... (A_ i j))
>
> versus
> ( ... (array-ref A i j))
>
> then it's worth investigating.
>
>
> That is remarkably large. Still, the rationale here is
> convenience/familiarity rather than performance.
If array-ref and array-set! were macros they would be quite a bit faster.
I wonder whether this could be an option.
Brad