Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8FE521787A for ; Sun, 15 Feb 2015 21:34:17 +0000 (UTC) Received: (qmail 32474 invoked by uid 500); 15 Feb 2015 21:34:17 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 32331 invoked by uid 500); 15 Feb 2015 21:34:17 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 32299 invoked by uid 99); 15 Feb 2015 21:34:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2015 21:34:16 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ansell.peter@gmail.com designates 209.85.160.175 as permitted sender) Received: from [209.85.160.175] (HELO mail-yk0-f175.google.com) (209.85.160.175) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2015 21:34:11 +0000 Received: by mail-yk0-f175.google.com with SMTP id q200so9268874ykb.6 for ; Sun, 15 Feb 2015 13:32:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=pKVeMUTHB+1F7K6PptTBFdlchWAMM+mNj1zpSNfLGXg=; b=tcAYIEsR5S6WtRrmz/5CKlQ8gWAbe+7BCyScpTTX3DjnRaDDwg/7ulvXbtpMmFxrmV vaYt1aRKXSog5AYmmPXlte7JNivRBWh+eIsBZ5yhqv0fCgcHVP918R8r0KPx+4g8iAyl x5Z/3Y6ErmpU+xB6maJhvT+4BiNOZRipCUC5wtb4JXVAzW1fjumghKZHYjPOkam/Gp8Q cvieILhXbfsbUSaZDVjMF6ukYemc9Q+qMHWN0cc8sAstTnqMAfjSd+pLrynnyjukFL0u +s4vkdSgY/Frl3QT2g+Z2chLe+3BIbsPlZJC4jsONaWXP8rDsmzo6suu6Y+fjwofz9F+ DWIA== MIME-Version: 1.0 X-Received: by 10.170.206.68 with SMTP id x65mr16067050yke.104.1424035940789; Sun, 15 Feb 2015 13:32:20 -0800 (PST) Received: by 10.170.113.75 with HTTP; Sun, 15 Feb 2015 13:32:20 -0800 (PST) In-Reply-To: References: <54B781D6.6060900@xup.nl> <54B78A0B.3080508@xup.nl> Date: Mon, 16 Feb 2015 08:32:20 +1100 Message-ID: Subject: Re: your opinion on commons-rdf proposal From: Peter Ansell To: Commons Developers List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On 24 January 2015 at 01:12, Reto Gm=C3=BCr 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 especiall= y >> in >> > the filter() method. >> > 2) Hmm, is filter() still required if we can use java 8 streams >> > (collection.stream().filter())? >> > > 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. Cheers, Peter --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org