Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 71004 invoked from network); 11 Feb 2008 16:36:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Feb 2008 16:36:35 -0000 Received: (qmail 33553 invoked by uid 500); 11 Feb 2008 16:36:27 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 33541 invoked by uid 500); 11 Feb 2008 16:36:27 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 33250 invoked by uid 99); 11 Feb 2008 16:36:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2008 08:36:26 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2008 16:36:03 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 028C1714079 for ; Mon, 11 Feb 2008 08:36:11 -0800 (PST) Message-ID: <26690576.1202747771008.JavaMail.jira@brutus> Date: Mon, 11 Feb 2008 08:36:11 -0800 (PST) From: "Evgeniya Maenkova (JIRA)" To: commits@harmony.apache.org Subject: [jira] Closed: (HARMONY-5478) [classlib] [luni] Math.floor/ceil/rint can be implemented w/o JNI calls In-Reply-To: <8467191.1202514487860.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-5478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Evgeniya Maenkova closed HARMONY-5478. -------------------------------------- Works, as expected. Thanks, Aleksey > [classlib] [luni] Math.floor/ceil/rint can be implemented w/o JNI calls > ----------------------------------------------------------------------- > > Key: HARMONY-5478 > URL: https://issues.apache.org/jira/browse/HARMONY-5478 > Project: Harmony > Issue Type: Improvement > Components: Classlib > Reporter: Evgeniya Maenkova > Assignee: Alexey Petrenko > Attachments: luni.math.2 > > > With this improvement the test mentioned below shows 17% boost on my laptop. > package math; > public class Floor { > public static void main(String[] args) { > double d1 = -123123.234; > double d2 = 1231233.123123; > double d3 = 23423.23; > for (int i = 0; i < 2500 * 2500; i ++) { > Math.floor(d3); > Math.ceil(d1); > Math.rint(d1); > Math.floor(d2); > Math.ceil(d2); > Math.rint(d2); > Math.floor(d3); > Math.ceil(d3); > Math.rint(d3); > } > > long start = System.currentTimeMillis(); > for (int i = 0; i < 2500 * 2500; i ++) { > Math.floor(d3); > Math.ceil(d1); > Math.rint(d1); > Math.floor(d2); > Math.ceil(d2); > Math.rint(d2); > Math.floor(d3); > Math.ceil(d3); > Math.rint(d3); > } > System.out.println("floor result: " + (System.currentTimeMillis() - start)); > } > } > Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1 > $ /cygdrive/c/home_test/temp_builds/egm_r618602/bin/java -Xem:server math.Floor > floor result: 17359 > Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1 > $ /cygdrive/c/home_test/temp_builds/egm_r618602_Mj_Mc/bin/java -Xem:server math > .Floor > floor result: 14876 > Administrator@EGMAENKO-MOBL /cygdrive/c/ecl_311_ws/MicroBenches/bin1 > $ -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.