[gameprogrammer] Re: detecting class type at runtime

  • From: Matthew Weigel <unique@xxxxxxxxxxx>
  • To: <gameprogrammer@xxxxxxxxxxxxx>
  • Date: Wed, 18 Apr 2012 10:03:47 -0500

On 18.04.2012 09:30, Kevin Jenkins wrote:

Games usually have RTTI disabled through the project properties. RTTI
slows down your application by about 15%.

That's a very broad statement, and not necessarily accurate. All of the MMOs I worked on made use of RTTI... but then, most had Linux servers, and
gcc on Linux makes RTTI much cheaper.  Even on Windows, though... the
performance implications of RTTI pale in comparison to writing game logic in an embedded scripting language like Lua or UnrealScript, yet those are
pretty popular.

One trend I've seen in the last few years is growing appreciation for
entity/component models, which absolutely rely on dynamic_cast being
available. (Another trend is of course data-oriented programming, which goes in the opposite direction and tries to improve cache behavior to boost
performance, so it's not like this is all one-sided.)
--
 Matthew Weigel
 hacker
 unique & idempot . ent

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: