Furthermore: spacetimex =: 7!:2 , 6!:2@]
spacetimex 'a=: 1 (2 3 4}) a' 1408 1.9e_5 spacetimex 'b=: 1 (2 3 4}) b' 1408 1.9e_5 (this looks okay, but can't explain) On Thu, 21 Oct 2021 at 21:11, Ben Gorte <[email protected]> wrote: > I thought I might know the answer, but it appears I do not. > However, I noticed that they are equally fast when I use 6!:2 alone: > > > (1000) 6!:2 'a=:1 (2 3 4) } a' > > 2.378e_6 > > (1000) 6!:2 'b=:1 (2 3 4) } b' > > 2.316e_6 > > > Also, with: > > spacespacex =: 7!:2 , 7!:2@] NB. why? > > you get: > > spacespacex 'a=:1 (2 3 4)}a' > > 1050080 1408 > > spacespacex 'b=:1 (2 3 4)}b' > > 1073743328 1408 > > > Is this a clue? > > > Ben > > > > > On Thu, 21 Oct 2021 at 19:19, Elijah Stone <[email protected]> wrote: > >> a=: 1e6$0 >> b=: 1e9$0 >> timespacex 'a=: 1 (2 3 4}) a' >> 0.000395 1408 >> timespacex 'b=: 1 (2 3 4}) b' >> 0.26758 1408 >> >> Since both of these operations take up the same amount of space, I assume >> they are done in-place. But if that is the case, why does the latter >> take >> longer? >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
