belated feedback Alex Shinn (16 Apr 2021 15:00 UTC)
Re: belated feedback Bradley Lucier (16 Apr 2021 17:08 UTC)
Re: belated feedback John Cowan (16 Apr 2021 18:25 UTC)
Re: belated feedback Bradley Lucier (17 Apr 2021 21:48 UTC)
Re: belated feedback Alex Shinn (18 Apr 2021 23:45 UTC)
Re: belated feedback Bradley Lucier (16 Apr 2021 23:46 UTC)
Re: belated feedback Alex Shinn (17 Apr 2021 00:03 UTC)
Re: belated feedback Bradley Lucier (17 Apr 2021 01:10 UTC)
Re: belated feedback Alex Shinn (17 Apr 2021 01:22 UTC)
Re: belated feedback Alex Shinn (30 Apr 2021 05:41 UTC)
Re: belated feedback Bradley Lucier (30 Apr 2021 14:17 UTC)
Re: belated feedback John Cowan (30 Apr 2021 15:04 UTC)
Re: belated feedback Bradley Lucier (30 Apr 2021 16:42 UTC)
Re: belated feedback Alex Shinn (01 May 2021 09:27 UTC)
array-elements-in-order? (Was: belated feedback) Bradley Lucier (16 Jan 2022 19:08 UTC)

Re: belated feedback Alex Shinn 17 Apr 2021 01:22 UTC

On Sat, Apr 17, 2021 at 10:10 AM Bradley Lucier <xxxxxx@math.purdue.edu> wrote:
>
> On 4/16/21 8:03 PM, Alex Shinn wrote:
>
> > What surprised me most is that after completing my work and looking at
> > the reference implementation, the latter does not seem to perform this
> > optimization.  In fact, the array record type only holds the indexer,
> > not the affine coefficients, so it cannot perform this optimization
> > (unless the compiler is smart enough to combine these closures at
> > runtime).
>
> The strides, lower bounds, and base index are implicit in the closures
> that implement the indexers in %%indexer-1/2/3/4/generic.  It's not the
> compiler that computes these parameters, it's code in
> %%compose-indexers.  Perhaps there's a better way.

Ah, sorry, I missed that.  You can just call the indexer on the first few values
to get the strides, very elegant.  For my own implementation since I want to
tie in with the FFI I will want to make the strides more explicit though.

--
Alex