Return-Path: Delivered-To: apmail-incubator-uima-dev-archive@locus.apache.org Received: (qmail 15556 invoked from network); 1 Oct 2008 15:23:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Oct 2008 15:23:41 -0000 Received: (qmail 54288 invoked by uid 500); 1 Oct 2008 15:23:40 -0000 Delivered-To: apmail-incubator-uima-dev-archive@incubator.apache.org Received: (qmail 54179 invoked by uid 500); 1 Oct 2008 15:23:40 -0000 Mailing-List: contact uima-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: uima-dev@incubator.apache.org Delivered-To: mailing list uima-dev@incubator.apache.org Received: (qmail 54160 invoked by uid 99); 1 Oct 2008 15:23:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 08:23:39 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of msa@schor.com designates 69.93.126.19 as permitted sender) Received: from [69.93.126.19] (HELO gateway01.websitewelcome.com) (69.93.126.19) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 01 Oct 2008 15:22:37 +0000 Received: (qmail 8646 invoked from network); 1 Oct 2008 15:40:15 -0000 Received: from gator74.hostgator.com (67.18.27.130) by gateway01.websitewelcome.com with SMTP; 1 Oct 2008 15:40:15 -0000 Received: from yktgi01e0-s5.watson.ibm.com ([129.34.20.19]:34343 helo=[9.2.34.80]) by gator74.hostgator.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1Kl3Xb-00052A-JG for uima-dev@incubator.apache.org; Wed, 01 Oct 2008 10:23:03 -0500 Message-ID: <48E395D8.6030500@schor.com> Date: Wed, 01 Oct 2008 11:23:04 -0400 From: Marshall Schor User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: uima-dev Subject: A possible core speedup X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator74.hostgator.com X-AntiAbuse: Original Domain - incubator.apache.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - schor.com X-Virus-Checked: Checked by ClamAV on apache.org I'm not sure this would speed anything up - but just in case: While doing some profiling, it appears that some time is spent (during deserializing) in CasImpl's ll_getTypeClass. This code is a big switch statement written as a series of "if" statements, testing the current typeSystemImpl instance's set of values for primitive type codes. Switch can't be used here because the "case" values must be constants. I think all the built-in type codes are constant - but the implementation seems to be allowing them to change (they're referenced from the TypeSystemImpl instance, as non-final values). Using constants would probably speed up this function quite a bit. Any reasons anyone sees we couldn't/shouldn't change this to use constants? -Marshall