Benchmarks for Various Data Structures

Results

Table of results (with no compiler optimizations: -O0). All times are in seconds.
Data structureinsert
(random)
delete
(random)
insert
(sorted)
delete
(sorted)
insert
(sorted rev.)
delete
(sorted rev.)
find
(random)
AVL tree1.4202.0150.9171.0020.9020.9940.712
Red-black tree0.7500.8320.3540.2070.3470.1970.717
Skiplist1.1041.1770.3190.1830.2450.2820.135
BList (2048)4.3353.2999.377 (no opt)
3.398 (w/opt)
1.1722.9143.4902.452
Hash table (OA)0.2692.914 (PACK)
1.014 (MARK)
0.251
Hash table (chaining)0.3910.3920.367

Table of results (with compiler optimization level -O2). All times are in seconds.
Data structureinsert*
(random)
delete*
(random)
insert
(sorted)
delete
(sorted)
insert
(sorted rev.)
delete
(sorted rev.)
find*
(random)
AVL tree0.6890.8420.1860.1970.1850.1960.345
Red-black tree0.6530.6010.2230.1100.2280.1090.328
Skiplist0.7900.7680.1380.0660.1110.1110.054
BList11.8372.4616.297 (no opt)2
0.691 (w/opt)3
0.1750.4753.3712.402
Hash table (OA)40.2130.655 (PACK)5
0.187 (MARK)6
0.222
Hash table (chaining)70.3600.3450.346

* These columns are the most relevant because they represent the average/typical case.

1The BList was tested with 2,048 items per node.
2No special optimizations were made and the normal search code was used to find the position.
3Before walking the list looking for the insertion point, a check was made to see if the value being inserted was larger than the largest element in the list. This meant no searching was required and it could simply be inserted at the end.
4The confguration: load factor is 0.667, hash function is Super Fast, and the collision resolution policy is linear probing.
5When an item is deleted, the remaining items in the cluster are reinserted into the table.
6When an item is deleted, the slot is simply marked as DELETED.
7The confguration: load factor is 5, hash function is Super Fast.

Here are some blist benchmarks that show the differences in performance.