Summary: | Optimization for POA_T::_downcast | ||
---|---|---|---|
Product: | TAO | Reporter: | Carlos O'Ryan <coryan> |
Component: | IDL Compiler | Assignee: | Ossama Othman <ossama.othman> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | ||
Priority: | P3 | ||
Version: | 1.4.2 | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | 1369 | ||
Bug Blocks: |
Description
Carlos O'Ryan
2004-11-22 09:02:46 CST
Jeff asked me to take care of this one since I'm currently working on skeleton refactoring detailed in bug 1369. Mine. When the dynamic cast could be used, the I think it makes use to reimplement also in tao/SystemException.cpp CORBA::SystemException::_tao_get_omg_exception_description Here a huge list with _is_a is used. The _downcast would then be much more efficient to be used. Johnny, using dynamic_cast<> in the _tao_get_omg_exception_description() method would be more efficient but doing so also increases footprint slightly by a few bytes. I confirmed the footprint increase with g++ 3.4.3. That said, I did remove the _is_a() calls in the exception _downcast() methods. Since we're doing a dynamic_cast<> on a pointer, the cast won't throw and will provide the exact behavior required by _downcast(), meaning that the _is_a() calls are redundant. Implementing this change for each of the exception _downcast() methods and inlining them results in a 6K drop for SystemException.o. Not much, but every little bit helps. Fixed. All all downcast operations now use dynamic_cast<>. Really fixed. :-) |