This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Class loader optimization patch


>>>>> "Mark" == Mark Wielaard <mark at klomp dot org> writes:

[ moved from classpath list ]

Mark> Of course it gets interesting if the code doesn't catch
Mark> Throwable but e.g. IOException and if these things get nested
Mark> but I am sure something could be worked out for those cases by
Mark> using a stack that remembers the most specific exception that
Mark> will be ignored next and you problably have to benchmark some
Mark> programs to see how often this pattern occurs and and which
Mark> situations doing all the bookkeeping is just overhead. There
Mark> must be papers about such exception elimination techniques.

I read about them somewhere.  Maybe just in the ORP docs, or maybe one
of the IBM Jalapeno papers.

Could we somehow mark up catch points with information about whether
or not the exception will be used?  If so we could change `throw new
FooException()' into something like:

    if (! findCatcher (FooException.class).needsException)
       ... just jump to catcher
    else
       ... do what we do now

This is potentially a good optimization, since filling in the stack
trace is expensive.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]