On Tue, Aug 11, 2015 at 7:07 PM, Dan Bron <[email protected]> wrote: > I’m not quite sure how you found that comp.lang.c thread,
It was linked from an answer in http://stackoverflow.com/questions/30023867/how-can-i-work-with-dynamically-allocated-arbitrary-dimensional-arrays which in turn was linked from an answer to your SO question. > I don’t know enough to comment on the wisdom of using the weighting vector > vs. doing the multiplications on the fly. > > Sounds to me like the trade-off is carrying another (#$y) integers around for > every single array vs. calculating */\.i.#$y every time we want to do an > index. This is the classic time-space trade-off of CS. Sure, but I think the time gained would usually be zero (because you typically would have an idle multiplying unit in your cpu) or slightly negative (because of the cost of addressing the extra memory). > On a separate note, I’m still struggling with figuring out the memory layout > of V arrays. > > Here’s where I am right now. When I memr the words starting at the memory > address returned by 15!:14, I see: (boxed array elided) How specifically did you get that? But, yeah, a V looks like this in C typedef struct {AF f1,f2;A f,g,h;I flag,mr,lr,rr,fdep;C id;} V; And, except for the id at the end, all of those types would be 64 bits wide in the implementation of J I think you are using. Thanks, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
