Class loader optimization patch
Tom Tromey
tromey@redhat.com
Fri Mar 14 23:06:00 GMT 2003
>>>>> "Mark" == Mark Wielaard <mark@klomp.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
More information about the Java
mailing list