After a discussion about the performance implications of dynamic_cast, I had some time on my hands and wanted to check it myself (at least to some degree). That prompted the measurements below, where dynamic_cast is compared against an implementation that uses class member that cary an unique identifier to check. The functionality of the implementation is not the same as with dynamic_cast, but it satisfies the application that was discussed:
class Base {