From: Hal Fulton Date: 2006-02-15T14:50:03+09:00 Subject: Re: Rescuing blocks? Dave Cantrell wrote: > Eric Hodel wrote: > >> >> You're going to get a performance hit setting up an exception trap >> this way. > > Time for some down-South edumucation. What kind of performance hit are > we talking about here? And why the hit at all? > > (I seem to recall reading somewhere once upon a time about memory stack > stuff, but I'm not an old-school C-programmer so I never had to deal > with it --- unfortunately for me...) Well, my knowledge is limited. Someone else can answer better. But look at it from a common-sense standpoint. Exceptions aren't magic. Everything Ruby does can be done in assembly language, it's just more verbose. I would think that exceptions, at the lowest level, work something like: if something_happened_here goto the_place_where_exceptions_are_caught So at the very least, catching exceptions means that you're doing some sort of comparison or conditional branch. And this is code that doesn't have to be run/generated *unless* you are catching exceptions. Just my naive take. Hal