I don't know why >/y is not good.
If the value changes by changing either last
of first item, it should involve every byte.

Next closest

   [EMAIL PROTECTED]

   (4*#q) %~ 2.8e9 * 6!:2 '>./q'   NB. raw
1.57819

actually +/y for ints with float result is faster CPB
   (8*#q)   %~ 2.8e9 * 6!:2 '+/q'
0.857189
   datatype +/q
floating

Compare
   [EMAIL PROTECTED]
   (4*#r)   %~ 2.8e9 * 6!:2 '+/r'
1.6156
   p=. 1e7#0.5
   (8*#p)   %~ 2.8e9 * 6!:2 '+/p'
1.40882


--- Roger Hui <[EMAIL PROTECTED]> wrote:

> Similar reply as for +./y .  And calibration gives
> wrong answer.
> 
> Try   +/boolean   , not calibrated.
> 
> 
> 
> ----- Original Message -----
> From: Oleg Kobchenko <[EMAIL PROTECTED]>
> Date: Friday, December 22, 2006 11:26 am
> Subject: Re: [Jprogramming] Cycles per Byte
> 
> > --- Roger Hui <[EMAIL PROTECTED]> wrote:
> > 
> > > +./y does not depend on the value of every byte
> > > in the argument.  Others of that ilk are
> > > (> i. 1:) (> i. 0:) etc.  
> > 
> > In a subsequent message I had put 1 at the very end,
> > and it checks all bytes. Time was slower but <1
> > calibrated.
> > 
> > Another one,
> > 
> >   (#y)   %~ 1.45e9 * 6!:2 '>/y'  NB. calibrated P4-2.8GHz
> > 0.00198489
> >   (#y)   %~ 2.8e9 * 6!:2 '>/y'   NB. raw
> > 0.00375467
> > 
> > Explanation:
> > 
> >   >/0 1
> > 0
> >   >/1 0
> > 1
> >   >/0 1 0
> > 0
> >   >/1 1 0
> > 0
> >   >/1 0 0
> > 1
> >   >/1 1 0 0
> > 0
> >   >/1 0 0 0
> > 1
> >   >/1 1 0 0
> > 0
> >   >/1 0 0 1
> > 1
> >   >/0 0 0 1
> > 0


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to