The essays emphasize insight more than overt efficiency.
The permutations essay 
http://www.jsoftware.com/jwiki/Essays/Permutations
give an example of different methods being more
efficient depending on the exact requirements.

Odometer benchmarks are skewed by the fact that
 #: i.@(*/) is supported by special code.



----- Original Message -----
From: Raul Miller <[email protected]>
Date: Sunday, February 21, 2010 19:49
Subject: Re: [Jchat] Efficient j
To: Chat forum <[email protected]>

> On Sun, Feb 21, 2010 at 5:36 PM, David Ward Lambert
> <[email protected]> wrote:
> > might affect the result making this request unreasonable.  For 
> instance,> is the structural odometer that a non-mathematician 
> might prefer less
> > efficient than base representation?
> >
> > odometer =: #: i.@(*/)         NB. mathematician's version perhaps
> > odometer2=: [: |: */ $&> */\...@}.@(,&1) #&.> i.&.>   NB. Structural
> 
> http://www.jsoftware.com/help/phrases/execution_time_space.htm
> 
>    ts=:6!:2,7!:2...@]
>    ts 'odometer p:i.5'
> 3.52e_5 133248
>    ts 'odometer2 p:i.5'
> 0.000124876 264832
> 
> the "mathematician's version" seems considerably more
> efficient than the alternative for this example that I
> randomly choose.
> 
> The same approach can be used to investigate other
> cases.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to