Insert-Erase Performance

The tests measure the performance of sets and dicts with integer keys. The following implementation are compared:

Integer Sets

The following figures show the running time of inserting integers and then erasing them, as a function of the number of integers (see _set_insert_erase.py for the source).

The following figure shows the performance of all the implementations:

_images/IntSetInsertEraseAll.png

The following figure shows the performance of all implementations with similar performance:

_images/IntSetInsertEraseAllNoBList.png

The sorted list implementation has worst asymptotic performance than the other containers. This becomes apparent in the following figure, where larger numbers of items were used:

_images/IntSetInsertEraseCompetitiveLonger.png

String Sets

The following figures show the running time of inserting strings and then erasing them, as a function of the number of strings (see _set_insert_erase.py for the source).

The following figure shows the performance of all the implementations:

_images/StrSetInsertEraseAll.png

The following figure shows the performance of all implementations with similar performance:

_images/StrSetInsertEraseAllNoBList.png

The sorted list implementation has worst asymptotic performance than the other containers. This becomes apparent in the following figure, where larger numbers of items were used:

_images/StrSetInsertEraseCompetitiveLonger.png

Integer Dicts

The following figures show the running time of inserting integers and then erasing them, as a function of the number of integers (see _dict_insert_erase.py for the source).

The following figure shows the performance of all the implementations:

_images/IntDictInsertEraseAll.png

The following figure shows the performance of all implementations with similar performance:

_images/IntDictInsertEraseAllNoBList.png

The sorted list implementation has worst asymptotic performance than the other containers. This becomes apparent in the following figure, where larger numbers of items were used:

_images/IntDictInsertEraseCompetitiveLonger.png

String Dicts

The following figures show the running time of inserting strings and then erasing them, as a function of the number of strings (see _dict_insert_erase.py for the source).

The following figure shows the performance of all the implementations:

_images/StrDictInsertEraseAll.png

The following figure shows the performance of all implementations with similar performance:

_images/StrDictInsertEraseAllNoBList.png

The sorted list implementation has worst asymptotic performance than the other containers. This becomes apparent in the following figure, where larger numbers of items were used:

_images/StrDictInsertEraseCompetitiveLonger.png

Table Of Contents

This Page