Appr. 15% performance boost by avoiding dynamic_cast in DOM