harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Strigun (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4549) [drlvm][jit][opt][perf]throwing/catching exceptions works slowly
Date Thu, 26 Jul 2007 12:53:40 GMT
[drlvm][jit][opt][perf]throwing/catching exceptions works slowly
----------------------------------------------------------------

                 Key: HARMONY-4549
                 URL: https://issues.apache.org/jira/browse/HARMONY-4549
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Vladimir Strigun


The test below shows that exception throwing/catching operations works slower on Harmony in
comparison win Sun. 

Results of test execution:
java client: 1200 msec
java server: 1000 
harmony server: 5700 msec


Small test:
public class TestExceptions {

    public static void main(String[] args) {
        //warmup VM first
        tryRaiseExceptions(1);
        long start = System.currentTimeMillis();
        tryRaiseExceptions(1000000);
        long res = System.currentTimeMillis() -start;
        System.out.println("completed in "+res+" msec");
    }

    public static void tryRaiseExceptions(int n) {
        for(int i=0; i<n; i++) 
            try{
                throw new TException();
            }catch(TException throwable){
                TException ts = Test2.test(throwable);
            }
    }
}


class Test2  {
   public static TException test(TException thr) {
       return thr;
   }
}

class TException extends RuntimeException {}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message