I did a test about the performance of visitor pattern or `dynamic` as follows:
<pre>
    CCObject* obj = CCString::create("hello");
    
    CC_PROFILER_START("dynamic");
    for (int i = 0; i < 10000000; ++i) {
        dynamic_cast<CCString*>(obj);
    }
    
    CC_PROFILER_STOP("dynamic");
    
    
    CC_PROFILER_START("visitor");
    
    for (int i = 0; i < 10000000; ++i) {
        CCPrettyPrinter visitor(0);
        obj->acceptVisitor(visitor);
    }
    
    CC_PROFILER_STOP("visitor");
    
    CC_PROFILER_DISPLAY_TIMERS();
</pre>

The result on iPhoneSimulator is:
<pre>
Cocos2d: dynamic: avg time, 210.308472ms
Cocos2d: visitor: avg time, 1205.037476ms
</pre>

I'll do more tests on iOS devices. But it seems that visitor pattern is slower than dynamic_cast.