You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Fursov (JIRA)" <ji...@apache.org> on 2007/07/27 14:10:18 UTC
[jira] Commented: (HARMONY-4549)
[drlvm][jit][opt][perf]throwing/catching exceptions works slowly
[ https://issues.apache.org/jira/browse/HARMONY-4549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516010 ]
Mikhail Fursov commented on HARMONY-4549:
-----------------------------------------
After Test2.test method is inlined the 'throwable' variable will become a dead code.
the 'throw new TException()' can be replaced by a simple branch instruction without any VM call.
I propose closing this issue only after no exception at all is thrown in generated code for the example in this test.
BTW:
after we have no exception thrown in the example above we can file another performance issue: empty loop elimination. AFAIK Jitrino.OPT does not have this optimization today.
> [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.