"The first thing we do, let's kill all the lawyers."
-- W. Shakespeare, Henry VI, Part II, Act 4,
Scene 2, 71-78.
f depends on the value of every byte of its
arguments. Moreover, functions that merely
increments or decrements reference counts are
excluded, in particular the monads < > ] [ and
the dyads ] [ ; are excluded.
You should not have to calibrate the rate.
A higher GHz rating g should have resulted in
a smaller time result from 6!:2 and the product
g * 6!:2 'blah' should work out to be the same.
Numbers for n %~ g * 6!:2 'blah' on different
machines permit comparisons on how efficient
the machines are.
----- Original Message -----
From: Oleg Kobchenko <[EMAIL PROTECTED]>
Date: Thursday, December 21, 2006 9:12 pm
Subject: Re: [Jprogramming] Cycles per Byte
> My champion so far is ]y
>
> (1*m) %~ 1.485e9 * 6!:2 'm$0' [ m=: 1e7
> 2.3605
> (4*#x) %~ 1.45e9 * 6!:2 'x+y'
> 2.68411
> (4*#x) %~ 1.45e9 * 6!:2 ']y'
> 0.000273429
>
> Note to callibrate the rate, I have to use
> g=1.485e9 or so on P4 2.8GHz.
>
>
> --- Roger Hui <[EMAIL PROTECTED]> wrote:
>
> > Let f be a function that depends on every byte of
> > its argument(s). >:y and x+y are examples of
> > such a function, and {.y is not. The number of
> > cycles per byte (CPB) for f is
> > n %~ g * 6!:2 ' f y'
> > n %~ g * 6!:2 'x f y'
> > where n is the number of bytes in dense x, y,
> > or the result x f y, whichever is the greatest;
> > and g is the clock rate of the CPU.
> >
> > For example, on an ordinary (not overclocked)
> > 2.2 Ghz AMD 3200+ machine,
> >
> > (1*m) %~ 2.2e9 * 6!:2 'm$0' [ m=: 1e7
> > 2.34726
> > (4*m) %~ 2.2e9 * 6!:2 'm$2' [ m=: 1e7
> > 2.3531
> > (8*m) %~ 2.2e9 * 6!:2 'm$0.2' [ m=: 1e7
> > 2.35242
> >
> > The CPB for $ is approximately 2.35.
> >
> > Some others:
> >
> > x=: 1e7 [EMAIL PROTECTED] 2
> > y=: 1e7 [EMAIL PROTECTED] 2
> > (#x) %~ 2.2e9 * 6!:2 'x+.y'
> > 4.85849
> > (4*#x) %~ 2.2e9 * 6!:2 'x+y'
> > 2.69899
> > (4*#x) %~ 2.2e9 * 6!:2 '/:x'
> > 6.04693
> > (#x) %~ 2.2e9 * 6!:2 '/:~x'
> > 3.09869
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm