From issues-return-23178-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Mon Nov 28 22:22:02 2011 Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 301919083 for ; Mon, 28 Nov 2011 22:22:02 +0000 (UTC) Received: (qmail 781 invoked by uid 500); 28 Nov 2011 22:22:01 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 718 invoked by uid 500); 28 Nov 2011 22:22:01 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 710 invoked by uid 99); 28 Nov 2011 22:22:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 22:22:01 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Nov 2011 22:22:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E2400A5BD2 for ; Mon, 28 Nov 2011 22:21:40 +0000 (UTC) Date: Mon, 28 Nov 2011 22:21:40 +0000 (UTC) From: "Gilles (Commented) (JIRA)" To: issues@commons.apache.org Message-ID: <1631353899.19897.1322518900928.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1529202690.9151.1314191969099.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (MATH-650) FastMath has static code which slows the first access to FastMath MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MATH-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13158856#comment-13158856 ] Gilles commented on MATH-650: ----------------------------- The reported issue itself is solved, but we still don't agree that it was a premature optimization to stuff a source file with huge literal arrays. It doesn't seem very tidy to have alternate ways (source file vs resource file) to load the precomputed values. However we can postpone the choice to a later date, when we can all be convinced that one approach is definitely better than the other... > FastMath has static code which slows the first access to FastMath > ----------------------------------------------------------------- > > Key: MATH-650 > URL: https://issues.apache.org/jira/browse/MATH-650 > Project: Commons Math > Issue Type: Improvement > Affects Versions: Nightly Builds > Environment: Android 2.3 (Dalvik VM with JIT) > Reporter: Alexis Robert > Priority: Minor > Fix For: 3.0 > > Attachments: FastMathLoadCheck.java, LucTestPerformance.java > > > Working on an Android application using Orekit, I've discovered that a simple FastMath.floor() takes about 4 to 5 secs on a 1GHz Nexus One phone (only the first time it's called). I've launched the Android profiling tool (traceview) and the problem seems to be linked with the static portion of FastMath code named "// Initialize tables" > The timing resulted in : > - FastMath.slowexp (40.8%) > - FastMath.expint (39.2%) > \- FastMath.quadmult() (95.6% of expint) > - FastMath.slowlog (18.2%) > Hoping that would help > Thanks! > Alexis Robert -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira