Changeset 71:341c8d5984bb in rrlib_util


Ignore:
Timestamp:
27.11.2012 23:56:24 (7 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
default
Phase:
public
Message:

Increased performance of tTaggedPointer significantly in debug mode by introducing typedef that avoids deep inheritance (which causes a lot of constructor and destructor calls)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tTaggedPointer.h

    r69 r71  
    7777class tTaggedPointer 
    7878{ 
    79   typedef tagged_pointer::tTaggedPointerImplementation<TAG_BIT_WIDTH, ALIGNED_POINTERS> tImplementation; 
     79  typedef typename tagged_pointer::tTaggedPointerImplementation<TAG_BIT_WIDTH, ALIGNED_POINTERS>::tImplementation tImplementation; 
    8080 
    8181  static_assert(TAG_BIT_WIDTH >= 1 && ((sizeof(void*) == 4 && TAG_BIT_WIDTH <= 32) || (TAG_BIT_WIDTH <= 16 || (ALIGNED_POINTERS && TAG_BIT_WIDTH <= 19))), "Invalid TAG_BIT_WIDTH"); 
  • tagged_pointer/tTaggedPointerImplementation.h

    r69 r71  
    7171class tTaggedPointerImplementation : public tTaggedPointerImplementation < TAG_BIT_WIDTH + 1, ALIGNED_POINTERS > 
    7272{ 
     73public: 
     74  typedef typename tTaggedPointerImplementation < TAG_BIT_WIDTH + 1, ALIGNED_POINTERS >::tImplementation tImplementation; 
    7375}; 
    7476 
     
    122124public: 
    123125 
     126  typedef tTaggedPointerImplementation tImplementation; 
     127 
    124128  void* GetPointer() const 
    125129  { 
     
    161165public: 
    162166 
     167  typedef tTaggedPointerImplementation tImplementation; 
     168 
    163169  void* GetPointer() const 
    164170  { 
     
    208214public: 
    209215 
     216  typedef tTaggedPointerImplementation tImplementation; 
     217 
    210218  void* GetPointer() const 
    211219  { 
     
    241249public: 
    242250  typedef uint64_t tStorage; 
     251  typedef tTaggedPointerImplementation tImplementation; 
    243252 
    244253  tTaggedPointerImplementation() : storage(0) {} 
Note: See TracChangeset for help on using the changeset viewer.