S
Steven Lien
Hi all
As far as i know, there has 2 ways RTTI in C++
one is dynamic_cast and another is typeid
Since, my book only pointed me that to use "typeid" and "static_cast"
conjunction will be much more efficient than "dynamic_cast",
but what the book does not provide any evidence.
So my question can any explain to me why dynmic_cast is slower than typeid??
And since it's much slower, why not simply throw it away
Any Help will be appreciated
As far as i know, there has 2 ways RTTI in C++
one is dynamic_cast and another is typeid
Since, my book only pointed me that to use "typeid" and "static_cast"
conjunction will be much more efficient than "dynamic_cast",
but what the book does not provide any evidence.
So my question can any explain to me why dynmic_cast is slower than typeid??
And since it's much slower, why not simply throw it away
Any Help will be appreciated