> From: Michael Ludwig [mailto:[EMAIL PROTECTED]
> Subject: Re: [Http]ServletResponseWrapper.getOutputStream()

> Try/catch can't be that much of a problem, can it? Isn't it
> just a fancy way of conditional branching with information
> attached?

Sorry, but no.  The throwing of an exception causes the current block to 
terminate abruptly and transfer control to JVM-generated code that searches a 
catch block table for the address of the failure, and then does further 
searches looking for a matching exception type.  If no match is found, the 
current stack frame is popped off, and the process repeats with the calling 
method's catch block table.  Although modern JITs are better at doing this than 
pre-HotSpot ones, it's still a lot more expensive than a simple test.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to