Here is perhaps a fairer way of contrasting these approaches

ps2=: ,@((] , ,&.>)/)@(<@,:"_1 , a:"_)
ps42=:3 :';<"1&.>((}:,;&.>@{:)
(}:,[:({.,<@([EMAIL PROTECTED],.&.>])@}.)[:,&.>/\.>@{:)^:n((n=.#y)$<i.0 
0)<@,<i.1
0){L:0 _ y'   NB. line wrap
ts=: 6!:2,7!:[EMAIL PROTECTED]

   (ps2 -: ps42) i.20
0
   (ps2 -:&(/:~) ps42) i.20
1

   ts 'ps2 i.20'
2.73083 1.53567e8
   ts 'ps42 i.20'
1.00453 3.10353e8

That said, I don't think there's anything particularly useful about the
way ps2 orders its results.

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

Reply via email to