Re: Performance cost of RTTI vs programmed type system
Mathias Gaunard ha scritto:
On 2 ao?t, 18:58, Sebastian Karlsson <Sebastian.Karls...@mmorpgs.org>
wrote:
The games
development community have a very strong dislike for RTTI, which going
by this information seems pretty unfounded.
From my personal experience, C++ code within the game development
community is fairly ugly, hacky and C-ish.
Sooo true! Sigh...
- It takes up some memory, as the lookup tables need to be stored
somewhere. Current compilers are still unable to remove unused extern
global variables, due to the separate compilation system.
Actually a lot of current compilers *are* able to do that, including two
that are very used in the game development industry: VC++ and
CodeWarrior. BTW, both of them have link-time code generation, so they
are no longer pure separate compilation systems.
Anyway, RTTI tables for polymorphic types cannot be stripped from the
final executable in most cases, because the compiler is not able to
detect that they won't be needed at runtime.
Ganesh
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]