what is happening is that there is special code for m&-. (same timing as no 
binding), but not for -. &n.

You can tell by the different memory footprints.  

It kind of makes sense that  -. needs to bind to m first, since that is what 
will be taken away from.  So the code has to unpack n from -.&n before applying 
it to both.  Of course it would be nice if it were faster.


----- Original Message -----
From: Brian Schott <[email protected]>
To: "[email protected]" <[email protected]>
Cc: 
Sent: Sunday, October 13, 2013 12:52:50 PM
Subject: Re: [Jprogramming] Odd timings for dyadic not (-.)

   10 ts 'm -. n'
0.0899539 5.24346e6
   g=:m&-.
   10 ts 'g n'
0.0908445 5.24365e6


Is the above relevant? Used iPad, pre OS7.
---
(B=)

On Oct 13, 2013, at 12:07 AM, Ganesh Rapolu <[email protected]> wrote:

>   m =. 1e6 ?@$ 1e6
>   n =. 50000 ?@$ 1e6
>   f  =. -.&n
>   10 ts 'm -. n'
> 0.0261088 9.43834e6
>   10 ts 'f m'
> 0.115288 8.39014e6
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

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

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

Reply via email to