RE: Eliminate duplicates in expansion?

On Thursday, May 24, 2012 11:51 AM, Manu Sporny wrote:
> On 05/23/2012 11:47 PM, Markus Lanthaler wrote:
> >> I think all of the algorithms should clean sets... we could also
> >> take the position that no cleaning should be done for performance
> >> reasons. That's really the strongest counter-point I can see now -
> >> performance... because multi-hundred-thousand-member sets are not
> >> going to be performant for this algorithm.
> >
> > Yes, exactly.. the problem is that expansion is used as the base of
> > every other algorithm and sometimes even multiple times. In framing
> > e.g. it gets called 2 (+1) times and then we check again for
> > duplicates in the subject map generation. If you have large sets
> > this adds up (3 x n²).
> >
> > If you feel strongly about this I'm not opposed to change my
> > implementation but I think it a) does not bring any advantages and
> > b) has a potential huge performance cost.
> 
> Yes, good point... we should make this an issue and discuss it on the
> telecon.

OK, done: https://github.com/json-ld/json-ld.org/issues/129


--
Markus Lanthaler
@markuslanthaler

Received on Thursday, 24 May 2012 09:33:53 UTC