From 59dd79faabf1d7177d130e454ffeb576649c3f6e Mon Sep 17 00:00:00 2001 From: delangel Date: Wed, 20 Apr 2011 19:15:58 +0000 Subject: [PATCH] One more optimization: don't use Math.round(), but do my own rouding/casting. UG now about 40% faster calling indels, 30-35% faster calling snp's+indels simultaneously. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5667 348d0f76-0448-11de-a6fe-93d51630548a --- java/src/org/broadinstitute/sting/utils/MathUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/org/broadinstitute/sting/utils/MathUtils.java b/java/src/org/broadinstitute/sting/utils/MathUtils.java index 2b8f0427f..01b697607 100755 --- a/java/src/org/broadinstitute/sting/utils/MathUtils.java +++ b/java/src/org/broadinstitute/sting/utils/MathUtils.java @@ -1035,8 +1035,8 @@ public class MathUtils { } // t has max(x,y), diff has abs(x-y) // we have pre-stored correction for 0,0.1,0.2,... 10.0 - int ind = (int)Math.round(diff*INV_JACOBIAN_LOG_TABLE_STEP); - + //int ind = (int)Math.round(diff*INV_JACOBIAN_LOG_TABLE_STEP); + int ind = (int)(diff*INV_JACOBIAN_LOG_TABLE_STEP+0.5); // gdebug+ //double z =Math.log10(1+Math.pow(10.0,-diff)); //System.out.format("x: %f, y:%f, app: %f, true: %f ind:%d\n",x,y,t2,z,ind);