I was about to post a suggestion having to do with a
different way to produce all pairs in this situation when
your message came in. So instead I elected to compare your
version of all pairs with one suggested by Roger Hui at
http://www.jsoftware.com/pipermail/programming/2007-February/005123.html

   ts =: (6!:2,7!:2)@]
   ts ';<@({.,.}.)\.i. 1000'
0.187662 9.64467e6
   ts ' ;(i. ([ }.@,. }.)&.> <@i.) 1000'
0.120952 9.63686e6
   (;<@({.,.}.)\.i. 10)-:;(i. ([ }.@,. }.)&.> <@i.) 10
1


On Thu, 17 Jan 2008, R.E. Boss wrote:

+ Different approach (haven't looked at the lab yet):
+
+    P2=: 3 : '%:(+/(,~#"1~(e.{:)) ])&.|:;<@({.,.}.)\.*:}.>:i.y'
+

(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to