Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How is try/catch and RTTI implemented?

Author: Dann Corbit

Date: 14:34:01 08/18/00

Go up one level in this thread


On August 18, 2000 at 14:47:30, Oliver Roese wrote:

>On August 17, 2000 at 18:12:50, Dann Corbit wrote:
>
>>I would be interested to see a set of functions that have been turned into a
>>class and for which the performance lost is more than 3%.
>>
>>If you don't use try/catch or RTTI, then the speed difference should be so small
>>that it is very hard to measure.  I don't know why you would need RTTI for a
>>chess game unless you had some very strange chess variant where you make up new
>>piece types on the fly or something.
>
>Just you are there, i would like to know.
>I really couldnt find any explanation on the net.
>Thanks in advance:)

I don't know how they are implemented, it's up to the compiler vendors.

I *suspect* that under the covers try/catch is little more than
setjmp()/longjmp() calls.

RTTI is expensive for obvious reasons.  You have some object and you don't even
know what it is until you interrogate it.  Could not possibly be as inexpensive
as a hardwired type.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.