commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Ansell <>
Subject Re: your opinion on commons-rdf proposal
Date Sun, 15 Feb 2015 21:32:20 GMT
On 24 January 2015 at 01:12, Reto Gmür <> wrote:
> Hi Minto
> Thanks for your comments.
>>     1) I am glad you chose to derive from Collections. This opens up the
>> >     possibility to use Java 8 streams to improve performance especially
>> in
>> >     the filter() method.
>> >     2) Hmm, is filter() still required if we can use java 8 streams
>> >     (
> I think only a dedicated filter method can be implemented perfomantly (i.e.
> using indexex). Correct me if I'm wron, but I think with stream().filter()
> an implementation would have to apply the function to every triple.

No, that isn't how Stream works. The evaluation is designed to be
completely lazy and only perform actions when a terminal operation is
executed, at which point the entire sequence of any
filters/maps/limits/orders/distinct/etc. is known and it can be
optimised completely then.

In addition, the Commons RDF specifically does not extend the
Collections interface, but it has Stream providing methods.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message