-
02Feb
2010 Double Dispatch – RTTI vs. Pure VtableAs Jeremy Clarkson would say, I have been inundated with a request to performance test a dynamic_cast DD mechanism against the pure vtable one. The results surprised me, both in Debug and Release modes. So here is the dynamic_cast implementation:
void c_rtti::foobar(a_rtti & a2) { c_rtti* c_ = dynamic_cast<c_rtti*>(&a2); if (c_) { [...]
-
01Feb
2010 Double dispatch without RTTII liked my StackOverflow answer so much that I decided to make it into a blog post. The question was how to implement a double dispatch mechanism for subclasses of one base class without casting. After dismissing the question as stupid, I spent a bit of time trying to come up with a solution that [...]
-
11Dec
2009 Shouldn’t RAII should be RDID???I will openly plead ignorance for design patterns. I know this is really not the way to be and Design Patterns and Code Complete are on my “to read” list. It’s only that I trawl through StackOverflow a bit lately that I get to hear a lot of buzz about patterns and idioms. Some people [...]