I use ts =: 6!:2 , 7!:2@:] so I had no excuse for not using it dyadically for averages. I had the mistaken impression that it would misreport the space requirements.
I will rerun, but the main point was to show that working with boxed data did not involve significant performance compromises. ----- Original Message ----- From: Devon McCormick <[email protected]> To: J-programming forum <[email protected]> Cc: Sent: Thursday, September 12, 2013 5:28:51 PM Subject: Re: [Jprogramming] An essay on boxed vs unboxed table performance This is one reason I like to look at time separately from space as 6!:2 takes an optional left argument to average the timing over multiple repetitions, e.g. 6!:2 '0 1{"1 ] 100000 10 $ a' 0.00741604 6!:2 '0 1{"1 ] 100000 10 $ a' 0.00668613 6!:2 '0 1{"1 ] 100000 10 $ a' 0.00724116 6!:2 '0 1{"1 ] 100000 10 $ a' 0.00575015 6!:2 '0 1{"1 ] 100000 10 $ a' 0.00510153 NB. Fairly high variance above vs. below: (10) 6!:2 '0 1{"1 ] 100000 10 $ a' 0.00504947 (10) 6!:2 '0 1{"1 ] 100000 10 $ a' 0.004953 (10) 6!:2 '0 1{"1 ] 100000 10 $ a' 0.0048413 (10) 6!:2 '0 1{"1 ] 100000 10 $ a' 0.0046273 (10) 6!:2 '0 1{"1 ] 100000 10 $ a' 0.00477414 On Thu, Sep 12, 2013 at 4:29 PM, Raul Miller <[email protected]> wrote: > I would note that several things can significantly influence timings. > It's also probably not wise to assuming that timing numbers are > completely reproducible. > > ts '0 1{"1 ] 100000 10 $ a' > 0.005122 1.04882e7 > ts '0 1{"1 ] 100000 10 $ a' > 0.00191 1.04882e7 > ts '0 1{"1 ] 100000 10 $ a' > 0.00194 1.04882e7 > > Things that can influence timing include the version of the > interpreter, the make of the cpu and the amount of available memory > (compared to what's being used in the timing). Here, though, we're > only using 10MB for intermediate results, which is relatively small on > typical current computers. > > Thanks, > > -- > Raul > > On Thu, Sep 12, 2013 at 3:35 PM, Pascal Jasmin <[email protected]> > wrote: > > > > > > An essay on boxed vs unboxed table data. > http://www.jsoftware.com/jwiki/PascalJasmin/Boxed%20vs%20unboxed%20data . > > > > The results might surprise most of you since there's been signficant > performance tuning in J (around boxing) since its earlier days, and jmf and > 3!:1 supports boxed data too now. > > > > Let me know if I've made mistakes, or overlooked something big. > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
