The underlying question is, how fast can you pump
bytes through the CPU using a J expression?
Perhaps I should have said this at the beginning;
the "function that depends on the value of every
byte" statement was an attempt to say this without
bringing in hardware terms.  

So expressions such as #y or $y or +./y or >/y or
15!:3 y or mapping a file do not qualify, because
the CPU does not need to process every byte on
any of those expressions.

Different architectures will give different 
cycles per byte on the same J expression.
This is as it should be.  For example, I'd
expect that a CPU with a smaller level I or
level II cache would have a higher CPB.  I have
observed this by comparing  m$0  on the AMD 3200+
against a Celeron, even though the AMD is rated 
at 2.2 GHz and the Celeron is at 2.79 GHz.



----- Original Message -----
From: "Miller, Raul D" <[EMAIL PROTECTED]>
Date: Friday, December 22, 2006 10:56 am
Subject: RE: [Jprogramming] Cycles per Byte

> Roger Hui wrote:
> > It is arguable and rejected.
> >
> > Any CPB number less than 1 is exceptional and 
> > requires explanation.
> 
> The implication here seems to be that that case
> was rejected for lack of explanation (as opposed
> to some other reason).
> 
> However, rather than risk that your intent
> differed from what you expressed, let's try a
> different case:
> 
>   require 'jmf'
>   f=: jpath '~system/examples/games/solitaire/cards.j31'
>   (#r) %~ 2.2e9 * 6!:2 'JCHAR map_jmf_ ''r'';f'
> 0.924737
> 
> Here, I am interpreting as "result" a value made available
> to the j environment as a result of the execution of the
> right argument to 6!:2.
> 
> A quirk, here, is that the argument is small and the result
> is large.  Different arguments could give different results,
> but that seems in accord with the original problem statement.
> 
> Another quirk, here, is that the result is placed in the
> symbol table by lower level logic, rather than as a result
> of =: in the expression.
> 
> So, my question is: is this a valid instance of CPB?  And,
> if not, could you explain the surrounding reasons (so that
> I could apply the rule to other contexts)?


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to