0. One of the goals of the linear representation (which you were using to generate the multi-digit display of 0.1&) is that if you re-enter the line you get the original noun/verb/whatever back. For some numbers many digits may be required, esp. if the code is a bit off regarding how many digits are required for the round-trip. The J interpreter depends on the C formatting of numbers, so it would not surprise me if the code is in fact a bit off in that regard.
1. The %. implementation does not take different paths that are dependent on the values in a non-singular matrix. (Part of what makes it algorithmically interesting :-). Therefore the time required should be the same for different random matrices. Of course, unless you have ripped out most of the stuff from your machine, that time would be impacted by e-mail arriving, your moving the mouse, the browser doing whatever, your anti-virus acting paranoid, whatever, whatever, ... On Wed, Sep 12, 2012 at 11:09 PM, Joey K Tuttle <j...@qued.com> wrote: > I agree with your point, but the "benchmark" has always included > generating the matrix and that is typically a very small part of the time > and should be relatively stable (although I suppose inverting the same > "random" matrix over and over would remove some variation). Your suggestion > of using a left argument for 6!:2 is the best way to reduce (or at lease > smooth out) variability. > > In repeating these expressions on my iPad, I discovered something I was > never aware of before... I accidentally tacked a & onto the end of the > expression - that has a very interesting (and actually useful) result. But > because it is a pain to email selections from the iPad, these were done on > an iMac i7 - > > 100 (6!:2) '%. 50 50 ?@$ 1000' > 0.00080055 > 100 (6!:2) '%. 50 50 ?@$ 1000'& > 0.000807989999999999967& > 0.1 > 0.1 > 0.1& > 0.100000000000000006& > 0j40 ": 0.1 > 0.**100000000000000005551115123125**7827021182 > > I never realized that tacking on the & displays the number which might be > useful to see the actual floating point representation. May be about as > silly as inverting random matrices, but also amusing... > > > On 2012/09/12 14:51 , Devon McCormick wrote: > >> Part of the reason for the variability is that you're generating a new >> matrix each time and including the generation in your timing. >> Something like this should give a more stable result: >> >> 6!:2 '%.mat' [ mat=. 50 50?.@$1000 >> >> Also, this form better allows you to run multiple timings to get a >> more stable number, e.g.: >> >> (10) 6!:2 '%.mat' >> >> On Mon, Sep 10, 2012 at 3:29 PM, Robert Cyr <robert....@gmail.com> wrote: >> >>> Results of the posted benchmark vary quie a bit: on this Nexus 7, >>> >>> 6!:2'%.50 50 ?.@$1000' >>> 0.043118 >>> >>> 6!:2'%.50 50 ?.@$1000' >>> 0.033788 >>> >>> 6!:2'%.50 50 ?.@$1000' >>> 0.030006 >>> >>> 6!:2'%.50 50 ?.@$1000' >>> 0.034632 >>> >>> 6!:2'%.50 50 ?.@$1000' >>> 0.023798 >>> >>> And with a larger sample, >>> >>> 6!:2'%.500 500 ?.@$1000' >>> 7.91767 >>> >>> 6!:2'%.500 500 ?.@$1000' >>> 8.07115 >>> >>> 6!:2'%.500 500 ?.@$1000' >>> 7.94837 >>> >>> About twice the time of the iPad >>> On Sep 9, 2012 6:53 AM, "bill lam" <bbill....@gmail.com> wrote: >>> >>> From google, iphone 4 uses cortex-a8 and that cpu uses vfp-lite which >>>> is 10 times slower than a regular vfp used in cortex-a9. >>>> >>>> Сбт, 08 Сен 2012, Joey K Tuttle писал(а): >>>> >>>>> That's a nice speedup! It will be interesting to try the iPhone 5. >>>>> >>>>> I'm curious if anyone has a timing from a generation 3 iPad, it may >>>>> well be faster than my iPad 2. >>>>> >>>>> On 2012/09/08 06:30 , J. Patrick Harrington wrote: >>>>> >>>>>> >>>>>> The iPhone 4S is faster: 5.6 sec >>>>>> >>>>>> On Fri, 7 Sep 2012, Joey K Tuttle wrote: >>>>>> >>>>>>> iPhone 4 - 18.2 seconds >>>>>>> iPad 2 - 4.6 seconds >>>>>>> >>>>>>> On 2012/09/07 19:48 , bill lam wrote: >>>>>>> >>>>>>>> I am curious to know what are the timings for iphone and ipad. >>>>>>>> >>>>>>>> It is around 6 to 11 seconds on android depending on CPU. >>>>>>>> >>>>>>>> Срд, 05 Сен 2012, Paul Jackson писал(а): >>>>>>>> >>>>>>>>> Some time ago, you and Roger were talking about timings on >>>>>>>>> %. 500 500 ?@$ 1000 >>>>>>>>> >>>>>>>>> I believe Roger said he had timings from the IPSA days. He also >>>>>>>>> said the >>>>>>>>> matix was considerably smaller. Did you ever get those early >>>>>>>>> machine >>>>>>>>> timings? >>>>>>>>> >>>>>>>>> Paul >>>>>>>>> >>>>>>>> ------------------------------**------------------------------** > ---------- > For information about J forums see > http://www.jsoftware.com/**forums.htm<http://www.jsoftware.com/forums.htm> ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm