Return-Path: X-Original-To: apmail-uima-user-archive@www.apache.org Delivered-To: apmail-uima-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6DFA9183FE for ; Wed, 21 Oct 2015 15:07:29 +0000 (UTC) Received: (qmail 38513 invoked by uid 500); 21 Oct 2015 15:07:29 -0000 Delivered-To: apmail-uima-user-archive@uima.apache.org Received: (qmail 38471 invoked by uid 500); 21 Oct 2015 15:07:29 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 38355 invoked by uid 99); 21 Oct 2015 15:07:28 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2015 15:07:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 4F8D41A229E for ; Wed, 21 Oct 2015 15:07:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.11 X-Spam-Level: X-Spam-Status: No, score=-0.11 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=uni-jena.de Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id BnUJgojEP0_z for ; Wed, 21 Oct 2015 15:07:24 +0000 (UTC) Received: from smtpout0.rz.uni-jena.de (smtpout0.rz.uni-jena.de [141.35.34.37]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 3CA3020B89 for ; Wed, 21 Oct 2015 15:07:24 +0000 (UTC) Received: from smtpin1.rz.uni-jena.de (smtpin0.rz.uni-jena.de [141.35.35.37]) by smtpout0.rz.uni-jena.de (Postfix) with ESMTPS id 3ngwCn4Gh2z2xLc for ; Wed, 21 Oct 2015 17:07:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uni-jena.de; s=opendkim-2015; t=1445440037; bh=Elvef3Rjodh71HDNEpukRrtw6lJ17OL2UH833rTSb2I=; h=From:Subject:Date:To:From; b=Zmb1XRhnKnwD2dovhM42LjUk6K/Ff4pabcEQ9aK5iUyqpvZHfuzfNnCWhxx+iFP+s a+cU4aQ0/U7XwgUlf9Z3WREI/PUB8BTwI8MfX3nLtKAelaYe3Vianq0OvP77XZi4ej jfF/QJArnmZaPS5Be4lnjRi4O+VJ8Odr2lP1fP0w= Received: from dyn-0a238cab.philo.uni-jena.de (dyn-0a238cab.philo.uni-jena.de [10.35.140.171]) by smtpin1.rz.uni-jena.de (Postfix) with ESMTPSA id 3ngwCn3QJjz2K for ; Wed, 21 Oct 2015 17:07:17 +0200 (CEST) From: =?utf-8?Q?Erik_F=C3=A4=C3=9Fler?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Performance of UIMAfit JCasUtil.selectCovered() and variants Message-Id: <07371163-1101-4350-93DB-849B272935C6@uni-jena.de> Date: Wed, 21 Oct 2015 17:07:17 +0200 To: user@uima.apache.org Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) X-Mailer: Apple Mail (2.3094) Hi all, I=E2=80=99m wondering about the performance differences between 1) JCasUtil.selectCovered(JCas, Class, AnnotationFS), 2) JCasUtil.selectCovered(JCas, Class, int, int) and 3) JCasUtil.indexCovered(JCas, Class, Class) It is clear that 3) iterates once through the CAS and just returns a = map. Once this is done, map access is swift. The Javadoc of 2) states that it is slower than 1). 3) states that it is preferable to 2). Questions: Is 3) also preferable over 2) when there is only one covering annotation = or is the performance of 2) and 3) roughly equal then? Main question: Is 3) also quicker than 1) if there are many covering = annotations? Use case: I want to iterate through all sentences in paragraphs. = Normally, I would use subiterators(), but the known type priority issue = could be a problem for me. Should I just use 1)? Or would I still = benefit from 3) if I have more than one paragraph? Thank you very much! Best, Erik=