|
|
In article <3fdcbcc2@news.povray.org> , Wolfgang Wieser <wwi### [at] gmxde>
wrote:
> I just have to emphasize the statement "if and only if used properly".
> Usind RTTI and exceptions, it is easy to get a really fat (as of binary
> size) and slow program much faster than you think.
No, not at all! RTTI is something you get for no runtime cost at all and
the data size it adds is in the range of a few dozen bytes per class. If
you can get exceptions for free depends a tiny bit on the architecture used,
but in general the answer is yes as well. In particular, if you don't throw
any exceptions inside a function, exceptions will not cost anything.
The frequently found warning that RTTI and exceptions make programs slow is
due to very early C++ compilers (we are talking about ten years old or more)
did not implement these features efficently. This is not the case for *any*
recent compiler released in the past few years.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|