Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

Performance Measurements

I did some timing tests on various aspects of the NoPtr library:

I compared these operations with the exact same ones if the proxies were replaced by raw pointers. Each of the four tests is done by a different file, located in the NoPtrLibRootDir/tests/performance (NoPtrLibRootDir is wherever you put the NoPtr lib). So far the timing results are great, except for container re-ordering. The table lists the time (in seconds) for executing every test, for raw pointers, for the NoPtr equivalents, and for the boost::shared_ptr equivalent, and the hit is for NoPtr vs raw:

    ====================================================================
    |       |  Construct  Return_tmp  Access  Construct_STL  Re-order  |
    --------------------------------------------------------------------
    | raw   |     21         21         27         20           13     |
    | noptr |     22         25         28         31          113     |
    | boost |     48         56         28         39          113     |
    --------------------------------------------------------------------
    | % hit |      5         18          3         60          770     |
    ====================================================================
    

Discussion:

So other than for re-ordering the elements of an STL container via std:: algorithms, the performance hit for having the functionality of NoPtr should be minimal for the typical program. Hopefully, the above numbers will help you estimate what would be the hit for your particular application and if the extra functionality of NoPtr is worth it.

Todo:
do a vector re-ordering test for RRef

figure out if re-ordering performance can be improved for DynObj

Author:
Oliver Schoenborn
Since:
Apr 2003

Generated on Mon Aug 4 18:51:32 2003 for NoPtr C++ Library by doxygen 1.3.2