The speed of exception handling !?!
kmahan at xmission.com
Mon Apr 6 07:24:05 PDT 1998
> Tim Wilkinson <tim at transvirtual.com> writes:
> > I suppose I always considered exceptions to be, well the exception - so
> > the speed didn't really matter. But now someone's demonstrated how
> > awful it actually is I thought I'd take a look.
> In some applications exceptions are very usefull to control the control flow
> of the proram. In some of my programms a thousand exceptions are generated
> per minute (writing a pattern matcher - developing an interpreter for a
> rule based language). Kaffe slows things down. In my oppinion many people
> don't use exceptions because they think that exceptions should be only the
> exception. But it's a rich feature of modern languages, which makes life
Just to toss in my 2 cents..
At JavaONE '98 in the VM BOF this very thing was brought up. Tim Lindholm
and a few of the other VM guys said that exceptions were supposed to be
(to quote tim and tim) "well, the exception".. They said that they had
removed all of the exceptions from javac that weren't being thrown for
errors such as "file not found" and such.. The sun VMs (classic and hotspot)
were speeding up exceptions, but that they wouldn't be rockets..
Anyway, I'm just parrotting what I remember hearing (so don't shoot the
messenger :) Anybody else in that BOF? (tue 12:30 as I recall).
TimL -- if I'm remembering wrong feel free to call me up and set me straight..
Final note: I'm not looking to start a religious argument here.
More information about the kaffe