Well...

If you use ([ -. -.)&~./ y then ~. gets applied to every row and to
every intermediate result.

Meanwhile, if you use ~.@([ -. -.)~/ then ~. only gets applied to the
intermediate results. But, also, those intermediate results are used
as the basis for constructing the set intersections (which means that
only the first intermediate result could ever need the ~.).

A related question, though is whether x -. y or ~. y is faster for a
highly redundant y.

Still, if your original data set were something like 40 1e6 ?@:$ 2
then the ~. would definitely speed things up.

Thanks,

-- 
Raul



On Sat, Sep 2, 2017 at 2:00 PM, 'Mike Day' via Programming
<programm...@jsoftware.com> wrote:
> No, firing from the hip as usual.
>
> I think I'd noticed repeated items in Skip's example rows.
>
> In practice,  he wouldn't know in advance the amount of redundancy in his
> data,
>
> so it's worth considering whether   ~.    is required in a particular case,
> and if so
>
> where to apply it.
>
>
> Cheers,
>
> Mike
>
>
>
> On 01/09/2017 11:02, Raul Miller wrote:
>>
>> It seems to me that using ~. would mostly only help in cases where
>>>
>>> ./([-.-.)/ y would almost always give the same result as >./,y
>>
>> That said, for those cases, I expect that a faster approach would
>> typically be >./~.@([ -. -.)~/ y
>>
>> That said, if you know of cases where these assumptions do not hold,
>> I'd be interested in hearing about them.
>>
>> Thanks,
>>
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
> ----------------------------------------------------------------------
> 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