I wrote:
> When optimizing J, it's good to keep the "special code" 
> list handy

I should've taken my own advice, because:

>       nub       =:  ~.@:({.  ~ _ , >./@:(i."1&' '))

Is (somewhat) slower than:

        nub2      =:  ~.@:({."1~     >./@:(i."1&' '))

which is supported by special code.  

Still, I prefer the  _ , ... formulation (i.e. directly request the rectangle 
of the size you want, rather than requesting "take this much from every row", 
which feels loopy).

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

Reply via email to