======================== Insert-Erase Performance ======================== .. include:: performance_compared.txt ------------ 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 :download:`_set_insert_erase.py` for the source). The following figure shows the performance of all the implementations: .. figure:: IntSetInsertEraseAll.png The following figure shows the performance of all implementations with similar performance: .. figure:: 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: .. figure:: 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 :download:`_set_insert_erase.py` for the source). The following figure shows the performance of all the implementations: .. figure:: StrSetInsertEraseAll.png The following figure shows the performance of all implementations with similar performance: .. figure:: 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: .. figure:: 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 :download:`_dict_insert_erase.py` for the source). The following figure shows the performance of all the implementations: .. figure:: IntDictInsertEraseAll.png The following figure shows the performance of all implementations with similar performance: .. figure:: 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: .. figure:: 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 :download:`_dict_insert_erase.py` for the source). The following figure shows the performance of all the implementations: .. figure:: StrDictInsertEraseAll.png The following figure shows the performance of all implementations with similar performance: .. figure:: 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: .. figure:: StrDictInsertEraseCompetitiveLonger.png