aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/doc/html/manual/policy_based_data_structures_test.html
blob: 932a82a7c46f11c9e42b27260764e626c5ab62e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Testing</title><meta name="generator" content="DocBook XSL-NS Stylesheets V1.77.1" /><meta name="keywords" content="ISO C++, policy, container, data, structure, associated, tree, trie, hash, metaprogramming" /><meta name="keywords" content="ISO C++, library" /><meta name="keywords" content="ISO C++, runtime, library" /><link rel="home" href="../index.html" title="The GNU C++ Library" /><link rel="up" href="policy_data_structures.html" title="Chapter 22. Policy-Based Data Structures" /><link rel="prev" href="policy_data_structures_design.html" title="Design" /><link rel="next" href="policy_data_structures_ack.html" title="Acknowledgments" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Testing</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="policy_data_structures_design.html">Prev</a> </td><th width="60%" align="center">Chapter 22. Policy-Based Data Structures</th><td width="20%" align="right"> <a accesskey="n" href="policy_data_structures_ack.html">Next</a></td></tr></table><hr /></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="pbds.test"></a>Testing</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.test.regression"></a>Regression</h3></div></div></div><p>The library contains a single comprehensive regression test.
    For a given container type in this library, the test creates
    an object of the container type and an object of the
    corresponding standard type (e.g., <code class="classname">std::set</code>). It
    then performs a random sequence of methods with random
    arguments (e.g., inserts, erases, and so forth) on both
    objects. At each operation, the test checks the return value of
    the method, and optionally both compares this library's
    object with the standard's object as well as performing other
    consistency checks on this library's object (e.g.,
    order preservation, when applicable, or node invariants, when
    applicable).</p><p>Additionally, the test integrally checks exception safety
    and resource leaks. This is done as follows. A special
    allocator type, written for the purpose of the test, both
    randomly throws an exceptions when allocations are performed,
    and tracks allocations and de-allocations. The exceptions thrown
    at allocations simulate memory-allocation failures; the
    tracking mechanism checks for memory-related bugs (e.g.,
    resource leaks and multiple de-allocations). Both
    this library's containers and the containers' value-types are
    configured to use this allocator.</p><p>For granularity, the test is split into the
    several sources, each checking only some containers.</p><p>For more details, consult the files in
    <code class="filename">testsuite/ext/pb_ds/regression</code>.
    </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="pbds.test.performance"></a>Performance</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="performance.hash"></a>Hash-Based</h4></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.hash.text_find"></a>
	  Text <code class="function">find</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.text_find.info"></a>
	    Description
	  </h6></div></div></div><p>
	    This test inserts a number of values with keys from an
	    arbitrary text (<a class="xref" href="policy_data_structures.html#biblio.wickland96thirty" title="Thirty Years Among the Dead">[biblio.wickland96thirty]</a>) into a container,
	    then performs a series of finds using
	    <code class="function">find</code> . It measures the average
	    time for <code class="function">find</code> as a function of
	  the number of values inserted.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/text_find_timing_test.cc</code>
	  </p><p>
	    And uses the data file:
	    <code class="filename">filethirty_years_among_the_dead_preproc.txt</code>
	  </p><p>The test checks the effect of different range-hashing
	  functions, trigger policies, and cache-hashing policies.
	  </p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.text_find.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic below show the results for the native
	  and collision-chaining hash types the the function
	  applied being a text find timing test using
	  <code class="function">find</code>.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_hash_text_find.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    n_hash_map_ncah
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_map</code>
		  </td><td align="left">
		    <code class="classname">cache_hash_code</code>
		  </td><td align="left">
		    <code class="constant">false</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mod_prime_1div1_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/1
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mask_exp_1div2_sth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mask_exp_1div1_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/1
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mask_exp_1div2_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.text_find.observations"></a>
	    Observations
	  </h6></div></div></div><p>In this setting, the range-hashing scheme affects performance
	  more than other policies. As the results show, containers using
	  mod-based range-hashing (including the native hash-based container,
	  which is currently hard-wired to this scheme) have lower performance
	  than those using mask-based range-hashing. A modulo-based
	  range-hashing scheme's main benefit is that it takes into account
	  all hash-value bits. Standard string hash-functions are designed to
	  create hash values that are nearly-uniform as is (<a class="xref" href="policy_data_structures.html#biblio.knuth98sorting" title="The Art of Computer Programming - Sorting and Searching">[biblio.knuth98sorting]</a>).</p><p>Trigger policies, i.e. the load-checks constants, affect
	  performance to a lesser extent.</p><p>Perhaps surprisingly, storing the hash value alongside each
	  entry affects performance only marginally, at least in this
	  library's implementation. (Unfortunately, it was not possible to run
	  the tests with <code class="classname">std::tr1::unordered_map</code> 's
	  <code class="classname">cache_hash_code = true</code> , as it appeared to
	  malfuntion.)</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.hash.int_find"></a>
	  Integer <code class="function">find</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.int_find.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with uniform
	  integer keys into a container, then performs a series of finds
	  using <code class="function">find</code>. It measures the average time
	  for <code class="function">find</code> as a function of the number of values
	  inserted.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/random_int_find_timing.cc</code>
	  </p><p>The test checks the effect of different underlying
	  hash-tables,
	  range-hashing functions, and trigger policies.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.int_find.results"></a>
	    Results
	  </h6></div></div></div><p>
	    There are two sets of results for this type, one for
	    collision-chaining hashes, and one for general-probe hashes.
	  </p><p>The first graphic below shows the results for the native and
	  collision-chaining hash types. The function applied being a random
	  integer timing test using <code class="function">find</code>.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_cc_hash_int_find.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    n_hash_map_ncah
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_map</code>
		  </td><td align="left">
		    <code class="classname">cache_hash_code</code>
		  </td><td align="left">
		    <code class="constant">false</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mod_prime_1div1_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/1
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mod_prime_1div2_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mask_exp_1div1_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/1
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mask_exp_1div2_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div><p>
	  </p><p>
	  </p><p>And the second graphic shows the results for the native and
	  general-probe hash types. The function applied being a random
	  integer timing test using <code class="function">find</code>.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_gp_hash_int_find.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    n_hash_map_ncah
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_map</code>
		  </td><td align="left">
		    <code class="classname">cache_hash_code</code>
		  </td><td align="left">
		    <code class="constant">false</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    gp_hash_mod_quadp_prime_1div2_nsth_map
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">gp_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Probe_Fn</code>
		  </td><td align="left">
		    <code class="classname">quadratic_probe_fn</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    gp_hash_mask_linp_exp_1div2_nsth_map
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">
		      gp_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Probe_Fn</code>
		  </td><td align="left">
		    <code class="classname">linear_probe_fn</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.int_find.observations"></a>
	    Observations
	  </h6></div></div></div><p>In this setting, the choice of underlying hash-table affects
	  performance most, then the range-hashing scheme and, only finally,
	  other policies.</p><p>When comparing probing and chaining containers, it is
	  apparent that the probing containers are less efficient than the
	  collision-chaining containers (
	  <code class="classname">std::tr1::unordered_map</code> uses
	  collision-chaining) in this case.</p><p>Hash-Based Integer Subscript Insert Timing Test shows
	  a different case, where the situation is reversed;
	  </p><p>Within each type of hash-table, the range-hashing scheme
	  affects performance more than other policies; Hash-Based Text
	  <code class="function">find</code> Find Timing Test also shows this. In the
	  above graphics should be noted that
	  <code class="classname">std::tr1::unordered_map</code> are hard-wired
	  currently to mod-based schemes.
	  </p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.hash.int_subscript_find"></a>
	  Integer Subscript <code class="function">find</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.int_subscript_find.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with uniform
	  integer keys into a container, then performs a series of finds
	  using <code class="function">operator[]</code>. It measures the average time
	  for <code class="function">operator[]</code> as a function of the number of
	  values inserted.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/random_int_subscript_find_timing.cc</code>
	  </p><p>The test checks the effect of different underlying
	  hash-tables, range-hashing functions, and trigger policies.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.int_subscript_find.results"></a>
	    Results
	  </h6></div></div></div><p>
	    There are two sets of results for this type, one for
	    collision-chaining hashes, and one for general-probe hashes.
	  </p><p>The first graphic below shows the results for the native
	  and collision-chaining hash types, using as the function
	  applied an integer subscript timing test with
	  <code class="function">find</code>.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_cc_hash_int_subscript_find.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    n_hash_map_ncah
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_map</code>
		  </td><td align="left">
		    <code class="classname">cache_hash_code</code>
		  </td><td align="left">
		    <code class="constant">false</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mod_prime_1div1_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/1
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mod_prime_1div2_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mask_exp_1div1_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/1
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mask_exp_1div2_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div><p>
	  </p><p>
	  </p><p>And the second graphic shows the results for the native and
	  general-probe hash types. The function applied being a random
	  integer timing test using <code class="function">find</code>.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_gp_hash_int_subscript_find.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    n_hash_map_ncah
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_map</code>
		  </td><td align="left">
		    <code class="classname">cache_hash_code</code>
		  </td><td align="left">
		    <code class="constant">false</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    gp_hash_mod_quadp_prime_1div2_nsth_map
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">gp_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Probe_Fn</code>
		  </td><td align="left">
		    <code class="classname">quadratic_probe_fn</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    gp_hash_mask_linp_exp_1div2_nsth_map
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">
		      gp_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Probe_Fn</code>
		  </td><td align="left">
		    <code class="classname">linear_probe_fn</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.int_subscript_find.observations"></a>
	    Observations
	  </h6></div></div></div><p>This test shows similar results to Hash-Based
	  Integer <code class="classname">find</code> Find Timing test.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.hash.int_subscript_insert"></a>
	  Integer Subscript <code class="function">insert</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.int_subscript_insert.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with uniform i.i.d.
	  integer keys into a container, using
	  <code class="function">operator[]</code>. It measures the average time for
	  <code class="function">operator[]</code> as a function of the number of
	  values inserted.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/random_int_subscript_insert_timing.cc</code>
	  </p><p>The test checks the effect of different underlying
	  hash-tables.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.int_subscript_insert.results"></a>
	    Results
	  </h6></div></div></div><p>
	    There are two sets of results for this type, one for
	    collision-chaining hashes, and one for general-probe hashes.
	  </p><p>The first graphic below shows the results for the native
	  and collision-chaining hash types, using as the function
	  applied an integer subscript timing test with
	  <code class="function">insert</code>.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_cc_hash_int_subscript_insert.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    n_hash_map_ncah
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_map</code>
		  </td><td align="left">
		    <code class="classname">cache_hash_code</code>
		  </td><td align="left">
		    <code class="constant">false</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mod_prime_1div1_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/1
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mod_prime_1div2_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mask_exp_1div1_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/1
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mask_exp_1div2_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div><p>
	  </p><p>
	  </p><p>And the second graphic shows the results for the native and
	  general-probe hash types. The function applied being a random
	  integer timing test using <code class="function">find</code>.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_gp_hash_int_subscript_insert.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    n_hash_map_ncah
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_map</code>
		  </td><td align="left">
		    <code class="classname">cache_hash_code</code>
		  </td><td align="left">
		    <code class="constant">false</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    gp_hash_mod_quadp_prime_1div2_nsth_map
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">gp_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Probe_Fn</code>
		  </td><td align="left">
		    <code class="classname">quadratic_probe_fn</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    gp_hash_mask_linp_exp_1div2_nsth_map
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">
		      gp_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Probe_Fn</code>
		  </td><td align="left">
		    <code class="classname">linear_probe_fn</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.int_subscript_insert.observations"></a>
	    Observations
	  </h6></div></div></div><p>In this setting, as in Hash-Based Text
	  <code class="function">find</code> Find Timing test and Hash-Based
	  Integer <code class="function">find</code> Find Timing test , the choice
	  of underlying hash-table underlying hash-table affects performance
	  most, then the range-hashing scheme, and
	  finally any other policies.</p><p>There are some differences, however:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>In this setting, probing tables function sometimes more
	    efficiently than collision-chaining tables.
	    This is explained shortly.</p></li><li class="listitem"><p>The performance graphs have a "saw-tooth" shape. The
	    average insert time rises and falls. As values are inserted
	    into the container, the load factor grows larger. Eventually,
	    a resize occurs. The reallocations and rehashing are
	    relatively expensive. After this, the load factor is smaller
	    than before.</p></li></ol></div><p>Collision-chaining containers use indirection for greater
	  flexibility; probing containers store values contiguously, in
	  an array (see Figure Motivation::Different
	  underlying data structures A and B, respectively). It
	  follows that for simple data types, probing containers access
	  their allocator less frequently than collision-chaining
	  containers, (although they still have less efficient probing
	  sequences). This explains why some probing containers fare
	  better than collision-chaining containers in this case.</p><p>
	    Within each type of hash-table, the range-hashing scheme affects
	    performance more than other policies. This is similar to the
	    situation in Hash-Based Text
	    <code class="function">find</code> Find Timing Test and Hash-Based
	    Integer <code class="function">find</code> Find Timing Test.
	    Unsurprisingly, however, containers with lower α<sub>max</sub> perform worse in this case,
	  since more re-hashes are performed.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.hash.zlob_int_find"></a>
	  Integer <code class="function">find</code> with Skewed-Distribution
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.zlob_int_find.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with a markedly
	  non-uniform integer keys into a container, then performs
	  a series of finds using <code class="function">find</code>. It measures the average
	  time for <code class="function">find</code> as a function of the number of values in
	  the containers. The keys are generated as follows. First, a
	  uniform integer is created. Then it is then shifted left 8 bits.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/hash_zlob_random_int_find_timing.cc</code>
	  </p><p>The test checks the effect of different range-hashing
	  functions and trigger policies.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.zlob_int_find.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic below show the results for the native, collision-chaining, and general-probing hash types.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_hash_zlob_int_find.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    n_hash_map_ncah
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_map</code>
		  </td><td align="left">
		    <code class="classname">cache_hash_code</code>
		  </td><td align="left">
		    <code class="constant">false</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mod_prime_1div1_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/1
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mask_exp_1div1_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/1
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    gp_hash_mod_quadp_prime_1div2_nsth_map
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">gp_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Probe_Fn</code>
		  </td><td align="left">
		    <code class="classname">quadratic_probe_fn</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.zlob_int_find.observations"></a>
	    Observations
	  </h6></div></div></div><p>In this setting, the distribution of keys is so skewed that
	  the underlying hash-table type affects performance marginally.
	  (This is in contrast with Hash-Based Text
	  <code class="function">find</code> Find Timing Test, Hash-Based
	  Integer <code class="function">find</code> Find Timing Test, Hash-Based
	  Integer Subscript Find Timing Test and Hash-Based
	  Integer Subscript Insert Timing Test.)</p><p>The range-hashing scheme affects performance dramatically. A
	  mask-based range-hashing scheme effectively maps all values
	  into the same bucket. Access degenerates into a search within
	  an unordered linked-list. In the graphic above, it should be noted that
	  <code class="classname">std::tr1::unordered_map</code> is hard-wired currently to mod-based and mask-based schemes,
	  respectively.</p><p>When observing the settings of this test, it is apparent
	  that the keys' distribution is far from natural. One might ask
	  if the test is not contrived to show that, in some cases,
	  mod-based range hashing does better than mask-based range
	  hashing. This is, in fact just the case. A
	  more natural case in which mod-based range hashing is better was not encountered.
	  Thus the inescapable conclusion: real-life key distributions are handled better
	  with an appropriate hash function and a mask-based
	  range-hashing function. (<code class="filename">pb_ds/example/hash_shift_mask.cc</code>
	  shows an example of handling this a-priori known skewed
	  distribution with a mask-based range-hashing function). If hash
	  performance is bad, a χ<sup>2</sup> test can be used
	  to check how to transform it into a more uniform
	  distribution.</p><p>For this reason, this library's default range-hashing
	  function is mask-based.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.hash.erase_mem"></a>
	  Erase Memory Use
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.erase_mem.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of uniform integer keys
	  into a container, then erases all keys except one. It measures
	  the final size of the container.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/hash_random_int_erase_mem_usage.cc</code>
	  </p><p>The test checks how containers adjust internally as their
	  logical size decreases.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.erase_mem.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic below show the results for the native, collision-chaining, and general-probing hash types.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_hash_int_erase_mem.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    n_hash_map_ncah
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_map</code>
		  </td><td align="left">
		    <code class="classname">cache_hash_code</code>
		  </td><td align="left">
		    <code class="constant">false</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mod_prime_1div1_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mod_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_prime_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/1
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    cc_hash_mask_exp_1div2_nsth_map
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="5" align="left">
		    gp_hash_mask_linp_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">gp_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Probe_Fn</code>
		  </td><td align="left">
		    <code class="classname">linear_probe_fn</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="hash.erase_mem.observations"></a>
	    Observations
	  </h6></div></div></div><p>The standard's hash-based containers act very differently than trees in
	  this respect. When erasing numerous keys from an standard
	  associative-container, the resulting memory user varies greatly
	  depending on whether the container is tree-based or hash-based.
	  This is a fundamental consequence of the standard's interface for
	  associative containers, and it is not due to a specific
	  implementation.</p></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="performance.branch"></a>Branch-Based</h4></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.branch.text_insert"></a>
	  Text <code class="function">insert</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.text_insert.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with keys from an arbitrary
	  text ([ wickland96thirty ]) into a container
	  using <code class="function">insert</code> . It measures the average time
	  for <code class="function">insert</code> as a function of the number of
	  values inserted.</p><p>The test checks the effect of different underlying
	  data structures.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/tree_text_insert_timing.cc</code>
	  </p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.text_insert.results"></a>
	    Results
	  </h6></div></div></div><p>The three graphics below show the results for the native
	  tree and this library's node-based trees, the native tree and
	  this library's vector-based trees, and the native tree
	  and this library's PATRICIA-trie, respectively.
	  </p><p>The graphic immediately below shows the results for the
	  native tree type and several node-based tree types.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_tree_text_insert_node.png" align="middle" /></div><p>
	      The abbreviated names in the legend of the graphic above are
	      instantiated with the types in the following table.
	    </p></div><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_map
		  </td></tr><tr><td align="left">
		    <code class="classname">std::map</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    splay_tree_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">splay_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rb_tree_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr></tbody></table></div><p>The graphic below shows the results for the
	  native tree type and a vector-based tree type.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_tree_text_insert_vector.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_map
		  </td></tr><tr><td align="left">
		    <code class="classname">std::map</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    ov_tree_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">ov_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr></tbody></table></div><p>The graphic below shows the results for the
	  native tree type and a PATRICIA trie type.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_tree_text_insert_trie.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_map
		  </td></tr><tr><td align="left">
		    <code class="classname">std::map</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pat_trie_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pat_trie_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.text_insert.observations"></a>
	    Observations
	  </h6></div></div></div><p>Observing the first graphic implies that for this setting, a splay tree
	  (<code class="classname">tree</code> with <code class="classname">Tag
	  </code> = <code class="classname">splay_tree_tag</code>) does not do
	  well. See also the Branch-Based
	  Text <code class="function">find</code> Find Timing Test. The two
	  red-black trees perform better.</p><p>Observing the second graphic, an ordered-vector tree
	  (<code class="classname">tree</code> with <code class="classname">Tag
	  </code> = <code class="classname">ov_tree_tag</code>) performs
	  abysmally. Inserting into this type of tree has linear complexity
	  [ austern00noset].</p><p>Observing the third and last graphic, A PATRICIA trie
	  (<code class="classname">trie</code> with <code class="classname">Tag
	  </code> = <code class="classname">pat_trie_tag</code>) has abysmal
	  performance, as well. This is not that surprising, since a
	  large-fan-out PATRICIA trie works like a hash table with
	  collisions resolved by a sub-trie. Each time a collision is
	  encountered, a new "hash-table" is built A large fan-out PATRICIA
	  trie, however, doe does well in look-ups (see Branch-Based
	  Text <code class="function">find</code> Find Timing Test). It may be
	  beneficial in semi-static settings.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.branch.text_find"></a>
	  Text <code class="function">find</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.text_find.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with keys from an
	  arbitrary text ([wickland96thirty]) into
	  a container, then performs a series of finds using
	  <code class="function">find</code>. It measures the average time
	  for <code class="function">find</code> as a function of the number of
	  values inserted.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/text_find_timing.cc</code>
	  </p><p>The test checks the effect of different underlying
	  data structures.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.text_find.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic immediately below shows the results for the
	  native tree type and several other tree types.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_tree_text_find.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_map
		  </td></tr><tr><td align="left">
		    <code class="classname">std::map</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    splay_tree_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">splay_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rb_tree_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    ov_tree_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">ov_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pat_trie_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pat_trie_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.text_find.observations"></a>
	    Observations
	  </h6></div></div></div><p>For this setting, a splay tree (<code class="classname">tree</code>
	  with <code class="classname">Tag
	  </code> = <code class="classname">splay_tree_tag</code>) does not do
	  well. This is possibly due to two reasons:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>A splay tree is not guaranteed to be balanced [motwani95random]. If a
	    splay tree contains n nodes, its average root-leaf
	    path can be m &gt;&gt; log(n).</p></li><li class="listitem"><p>Assume a specific root-leaf search path has length
	    m, and the search-target node has distance m'
	    from the root. A red-black tree will require m + 1
	    comparisons to find the required node; a splay tree will
	    require 2 m' comparisons. A splay tree, consequently,
	    can perform many more comparisons than a red-black tree.</p></li></ol></div><p>An ordered-vector tree (<code class="classname">tree</code>
	  with <code class="classname">Tag</code> =  <code class="classname">ov_tree_tag</code>), a red-black
	  tree (<code class="classname">tree</code>
	  with <code class="classname">Tag</code>  = <code class="classname">rb_tree_tag</code>), and the
	  native red-black tree all share approximately the same
	  performance.</p><p>An ordered-vector tree is slightly slower than red-black
	  trees, since it requires, in order to find a key, more math
	  operations than they do. Conversely, an ordered-vector tree
	  requires far lower space than the others. ([austern00noset], however,
	  seems to have an implementation that is also faster than a
	  red-black tree).</p><p>A PATRICIA trie (<code class="classname">trie</code>
	  with <code class="classname">Tag</code> = <code class="classname">pat_trie_tag</code>) has good
	  look-up performance, due to its large fan-out in this case. In
	  this setting, a PATRICIA trie has look-up performance comparable
	  to a hash table (see Hash-Based Text
	  <code class="classname">find</code> Timing Test), but it is order
	  preserving. This is not that surprising, since a large-fan-out
	  PATRICIA trie works like a hash table with collisions resolved
	  by a sub-trie. A large-fan-out PATRICIA trie does not do well on
	  modifications (see Tree-Based and Trie-Based
	  Text Insert Timing Test). Therefore, it is possibly beneficial in
	  semi-static settings.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.branch.text_lor_find"></a>
	  Text <code class="function">find</code> with Locality-of-Reference
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.text_lor_find.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with keys from an
	  arbitrary text ([ wickland96thirty ]) into
	  a container, then performs a series of finds using
	  <code class="function">find</code>. It is different than Tree-Based and
	  Trie-Based Text <code class="function">find</code> Find Timing Test in the
	  sequence of finds it performs: this test performs multiple
	  <code class="function">find</code>s on the same key before moving on to the next
	  key. It measures the average time for <code class="function">find</code> as a
	  function of the number of values inserted.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/tree_text_lor_find_timing.cc</code>
	  </p><p>The test checks the effect of different underlying
	  data structures in a locality-of-reference setting.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.text_lor_find.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic immediately below shows the results for the
	  native tree type and several other tree types.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_tree_text_lor_find.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_map
		  </td></tr><tr><td align="left">
		    <code class="classname">std::map</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    splay_tree_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">splay_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rb_tree_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    ov_tree_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">ov_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pat_trie_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pat_trie_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.text_lor_find.observations"></a>
	    Observations
	  </h6></div></div></div><p>For this setting, an ordered-vector tree
	  (<code class="classname">tree</code> with <code class="classname">Tag</code>
	  = <code class="classname">ov_tree_tag</code>), a red-black tree
	  (<code class="classname">tree</code> with <code class="classname">Tag</code>
	  = <code class="classname">rb_tree_tag</code>), and the native red-black
	  tree all share approximately the same performance.</p><p>A splay tree (<code class="classname">tree</code>
	  with <code class="classname">Tag</code> = <code class="classname">splay_tree_tag</code>) does
	  much better, since each (successful) find "bubbles" the
	  corresponding node to the root of the tree.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.branch.split_join"></a>
	  <code class="function">split</code> and <code class="function">join</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.split_join.info"></a>
	    Description
	  </h6></div></div></div><p>This test a container, inserts into a number of values, splits
	  the container at the median, and joins the two containers. (If the
	  containers are one of this library's trees,
	  it splits and joins with the <code class="function">split</code> and
	  <code class="function">join</code> method; otherwise, it uses the <code class="function">erase</code> and
	  <code class="function">insert</code> methods.) It measures the time for splitting
	  and joining the containers as a function of the number of
	  values inserted.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/tree_split_join_timing.cc</code>
	  </p><p>The test checks the performance difference of <code class="function">join</code>
	  as opposed to a sequence of <code class="function">insert</code> operations; by
	  implication, this test checks the most efficient way to erase a
	  sub-sequence from a tree-like-based container, since this can
	  always be performed by a small sequence of splits and joins.
	  </p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.split_join.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic immediately below shows the results for the
	  native tree type and several other tree types.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_tree_split_join.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_set
		  </td></tr><tr><td align="left">
		    <code class="classname">std::set</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    splay_tree_set
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">splay_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rb_tree_set
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    ov_tree_set
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">ov_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pat_trie_map
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pat_trie_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.split_join.observations"></a>
	    Observations
	  </h6></div></div></div><p>In this test, the native red-black trees must be split and
	  joined externally, through a sequence of <code class="function">erase</code> and
	  <code class="function">insert</code> operations. This is clearly
	  super-linear, and it is not that surprising that the cost is
	  high.</p><p>This library's tree-based containers use in this test the
	  <code class="function">split</code> and <code class="function">join</code> methods,
	  which have lower complexity: the <code class="function">join</code> method
	  of a splay tree (<code class="classname">tree</code>
	  with <code class="classname">Tag </code>
	  = <code class="classname">splay_tree_tag</code>) is quadratic in the
	  length of the longest root-leaf path, and linear in the total
	  number of elements; the <code class="function">join</code> method of a
	  red-black tree (<code class="classname">tree</code>
	  with <code class="classname">Tag </code>
	  = <code class="classname">rb_tree_tag</code>) or an ordered-vector tree
	  (<code class="classname">tree</code> with <code class="classname">Tag </code>
	  = <code class="classname">ov_tree_tag</code>) is linear in the number of
	  elements.</p><p>Asides from orders of growth, this library's trees access their
	  allocator very little in these operations, and some of them do not
	  access it at all. This leads to lower constants in their
	  complexity, and, for some containers, to exception-free splits and
	  joins (which can be determined
	  via <code class="classname">container_traits</code>).</p><p>It is important to note that <code class="function">split</code> and
	  <code class="function">join</code> are not esoteric methods - they are the most
	  efficient means of erasing a contiguous range of values from a
	  tree based container.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.branch.order_statistics"></a>
	  Order-Statistics
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.order_statistics.info"></a>
	    Description
	  </h6></div></div></div><p>This test creates a container, inserts random integers into the
	  the container, and then checks the order-statistics of the
	  container's values. (If the container is one of this
	  library's trees, it does this with
	  the <code class="function">order_of_key</code> method of
	  <code class="classname">tree_order_statistics_node_update</code>
	  ; otherwise, it uses the <code class="function">find</code> method and
	  <code class="function">std::distance</code>.) It measures the average
	  time for such queries as a function of the number of values
	  inserted.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/tree_order_statistics_timing.cc</code>
	  </p><p>The test checks the performance difference of policies based
	  on node-invariant as opposed to a external functions.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.order_statistics.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic immediately below shows the results for the
	  native tree type and several other tree types.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_tree_order_statistics.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_set
		  </td></tr><tr><td align="left">
		    <code class="classname">std::set</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    splay_tree_ost_set
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">splay_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">tree_order_statistics_node_update</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rb_tree_ost_set
		  </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">tree_order_statistics_node_update</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="branch.order_statistics.observations"></a>
	    Observations
	  </h6></div></div></div><p>In this test, the native red-black tree can support
	  order-statistics queries only externally, by performing a
	  <code class="classname">find</code> (alternatively, <code class="classname">lower_bound</code> or
	  <code class="classname">upper_bound</code> ) and then using <code class="classname">std::distance</code> .
	  This is clearly linear, and it is not that surprising that the
	  cost is high.</p><p>This library's tree-based containers use in this test the
	  <code class="classname">order_of_key</code> method of <code class="classname">tree_order_statistics_node_update</code>.
	  This method has only linear complexity in the length of the
	  root-node path. Unfortunately, the average path of a splay tree
	  (<code class="classname">tree</code>
	  with <code class="classname">Tag =</code> <code class="classname">splay_tree_tag</code> ) can
	  be higher than logarithmic; the longest path of a red-black
	  tree (<code class="classname">tree</code>
	  with <code class="classname">Tag =</code> <code class="classname">rb_tree_tag</code> ) is
	  logarithmic in the number of elements. Consequently, the splay
	  tree has worse performance than the red-black tree.</p></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="performance.multimap"></a>Multimap</h4></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.multimap.text_find_small"></a>
	  Text <code class="function">find</code> with Small Secondary-to-Primary Key Ratios 
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_find_small.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of pairs into a container. The
	  first item of each pair is a string from an arbitrary text
	  [wickland96thirty], and
	  the second is a uniform i.i.d.integer. The container is a
	  "multimap" - it considers the first member of each pair as a
	  primary key, and the second member of each pair as a secondary
	  key (see Motivation::Associative
	  Containers::Alternative to Multiple Equivalent Keys). There
	  are 400 distinct primary keys, and the ratio of secondary keys
	  to primary keys ranges from 1 to 5.</p><p>The test measures the average find-time as a function of the
	  number of values inserted. For this library's containers, it
	  finds the secondary key from a container obtained from finding
	  a primary key. For the native multimaps, it searches a range
	  obtained using <code class="classname">std::equal_range</code> on a primary key.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/multimap_text_find_timing_small.cc</code>
	  </p><p>The test checks the find-time scalability of different
	  "multimap" designs.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_find_small.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic below show the results for "multimaps" which
	  use a tree-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_find_small_s2p_tree.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="5" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div><p>The graphic below show the results for "multimaps" which
	  use a hash-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_find_small_s2p_hash.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_hash_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="6" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_find_small.observations"></a>
	    Observations
	  </h6></div></div></div><p>See Observations::Mapping-Semantics
	  Considerations.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.multimap.text_find_large"></a>
	  Text <code class="function">find</code> with Large Secondary-to-Primary Key Ratios 
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_find_large.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of pairs into a container. The
	  first item of each pair is a string from an arbitrary text
	  [wickland96thirty], and
	  the second is a uniform integer. The container is a
	  "multimap" - it considers the first member of each pair as a
	  primary key, and the second member of each pair as a secondary
	  key. There
	  are 400 distinct primary keys, and the ratio of secondary keys
	  to primary keys ranges from 1 to 5.</p><p>The test measures the average find-time as a function of the
	  number of values inserted. For this library's containers, it
	  finds the secondary key from a container obtained from finding
	  a primary key. For the native multimaps, it searches a range
	  obtained using <code class="classname">std::equal_range</code> on a primary key.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/multimap_text_find_timing_large.cc</code>
	  </p><p>The test checks the find-time scalability of different
	  "multimap" designs.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_find_large.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic below show the results for "multimaps" which
	  use a tree-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_find_large_s2p_tree.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="5" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div><p>The graphic below show the results for "multimaps" which
	  use a hash-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_find_large_s2p_hash.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_hash_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="6" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_find_large.observations"></a>
	    Observations
	  </h6></div></div></div><p>See Observations::Mapping-Semantics
	  Considerations.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.multimap.text_insert_small"></a>
	  Text <code class="function">insert</code> with Small
	  Secondary-to-Primary Key Ratios
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_small.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of pairs into a container. The
	  first item of each pair is a string from an arbitrary text
	  [wickland96thirty], and
	  the second is a uniform integer. The container is a
	  "multimap" - it considers the first member of each pair as a
	  primary key, and the second member of each pair as a secondary
	  key. There
	  are 400 distinct primary keys, and the ratio of secondary keys
	  to primary keys ranges from 1 to 5.</p><p>The test measures the average insert-time as a function of
	  the number of values inserted. For this library's containers,
	  it inserts a primary key into the primary associative
	  container, then a secondary key into the secondary associative
	  container. For the native multimaps, it obtains a range using
	  <code class="classname">std::equal_range</code>, and inserts a value only if it was
	  not contained already.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/multimap_text_insert_timing_small.cc</code>
	  </p><p>The test checks the insert-time scalability of different
	  "multimap" designs.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_small.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic below show the results for "multimaps" which
	  use a tree-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_insert_small_s2p_tree.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="5" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div><p>The graphic below show the results for "multimaps" which
	  use a hash-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_find_small_s2p_hash.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_hash_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="6" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_small.observations"></a>
	    Observations
	  </h6></div></div></div><p>See Observations::Mapping-Semantics
	  Considerations.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.multimap.text_insert_large"></a>
	  Text <code class="function">insert</code> with Small
	  Secondary-to-Primary Key Ratios
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_large.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of pairs into a container. The
	  first item of each pair is a string from an arbitrary text
	  [wickland96thirty], and
	  the second is a uniform integer. The container is a
	  "multimap" - it considers the first member of each pair as a
	  primary key, and the second member of each pair as a secondary
	  key. There
	  are 400 distinct primary keys, and the ratio of secondary keys
	  to primary keys ranges from 1 to 5.</p><p>The test measures the average insert-time as a function of
	  the number of values inserted. For this library's containers,
	  it inserts a primary key into the primary associative
	  container, then a secondary key into the secondary associative
	  container. For the native multimaps, it obtains a range using
	  <code class="classname">std::equal_range</code>, and inserts a value only if it was
	  not contained already.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/multimap_text_insert_timing_large.cc</code>
	  </p><p>The test checks the insert-time scalability of different
	  "multimap" designs.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_large.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic below show the results for "multimaps" which
	  use a tree-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_insert_large_s2p_tree.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="5" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div><p>The graphic below show the results for "multimaps" which
	  use a hash-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_find_large_s2p_hash.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_hash_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="6" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_large.observations"></a>
	    Observations
	  </h6></div></div></div><p>See Observations::Mapping-Semantics
	  Considerations.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.multimap.text_insert_mem_small"></a>
	  Text <code class="function">insert</code> with Small
	  Secondary-to-Primary Key Ratios Memory Use
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_mem_small.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of pairs into a container. The
	  first item of each pair is a string from an arbitrary text
	  [wickland96thirty], and
	  the second is a uniform integer. The container is a
	  "multimap" - it considers the first member of each pair as a
	  primary key, and the second member of each pair as a secondary
	  key. There
	  are 100 distinct primary keys, and the ratio of secondary keys
	  to primary keys ranges to about 20.</p><p>The test measures the memory use as a function of the number
	  of values inserted.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/multimap_text_insert_mem_usage_small.cc</code>
	  </p><p>The test checks the memory scalability of different
	  "multimap" designs.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_mem_small.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic below show the results for "multimaps" which
	  use a tree-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_insert_mem_small_s2p_tree.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="5" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div><p>The graphic below show the results for "multimaps" which
	  use a hash-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_find_large_s2p_hash.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_hash_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="6" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_mem_small.observations"></a>
	    Observations
	  </h6></div></div></div><p>See Observations::Mapping-Semantics
	  Considerations.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.multimap.text_insert_mem_large"></a>
	  Text <code class="function">insert</code> with Small
	  Secondary-to-Primary Key Ratios Memory Use
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_mem_large.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of pairs into a container. The
	  first item of each pair is a string from an arbitrary text
	  [wickland96thirty], and
	  the second is a uniform integer. The container is a
	  "multimap" - it considers the first member of each pair as a
	  primary key, and the second member of each pair as a secondary
	  key. There
	  are 100 distinct primary keys, and the ratio of secondary keys
	  to primary keys ranges to about 20.</p><p>The test measures the memory use as a function of the number
	  of values inserted.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/multimap_text_insert_mem_usage_large.cc</code>
	  </p><p>The test checks the memory scalability of different
	  "multimap" designs.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_mem_large.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic below show the results for "multimaps" which
	  use a tree-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_insert_mem_large_s2p_tree.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="5" align="left" valign="top">
		    <code class="classname">tree</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rb_tree_tag</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Node_Update</code>
		  </td><td align="left">
		    <code class="classname">null_node_update</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div><p>The graphic below show the results for "multimaps" which
	  use a hash-based container for primary keys.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_multimap_text_find_large_s2p_hash.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /><col align="left" class="c7" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    n_hash_mmap
		  </td></tr><tr><td align="left">
		    <code class="classname">std::tr1::unordered_multimap</code>
		  </td><td colspan="6" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_lu_mtf_set
		  </td></tr><tr><td rowspan="4" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left">
		    <code class="classname">Mapped</code>
		  </td><td align="left">
		    <code class="classname">list_update</code>
		  </td><td align="left">
		    <code class="classname">Update_Policy</code>
		  </td><td align="left">
		    <code class="classname">lu_move_to_front_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr bgcolor="#B0B0B0"><td colspan="7" align="left">
		    rb_tree_mmap_cc_hash_mask_exp_1div2_nsth_set
		  </td></tr><tr><td rowspan="6" align="left" valign="top">
		    <code class="classname">
		      cc_hash_table
		    </code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="4" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="3" align="left" valign="top">
		    <code class="classname">Mapped</code>
		  </td><td rowspan="3" align="left" valign="top">
		    <code class="classname">cc_hash_table</code>
		  </td><td align="left">
		    <code class="classname">Comb_Hash_Fn</code>
		  </td><td align="left">
		    <code class="classname">direct_mask_range_hashing</code>
		  </td><td colspan="2" align="left"> </td></tr><tr><td rowspan="2" align="left" valign="top">
		    <code class="classname">Resize_Policy</code>
		  </td><td rowspan="2" align="left" valign="top">
		    <code class="classname">hash_standard_resize_policy</code>
		  </td><td align="left">
		    <code class="classname">Size_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_exponential_size_policy</code>
		  </td></tr><tr><td align="left" valign="top">
		    <code class="classname">Trigger_Policy</code>
		  </td><td align="left">
		    <code class="classname">hash_load_check_resize_trigger</code> with
		    α<sub>min</sub> = 1/8 and α<sub>max</sub> = 1/2
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="multimap.text_insert_mem_large.observations"></a>
	    Observations
	  </h6></div></div></div><p>See Observations::Mapping-Semantics
	  Considerations.</p></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="performance.priority_queue"></a>Priority Queue</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.priority_queue.text_push"></a>
	  Text <code class="function">push</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_push.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with keys from an
	  arbitrary text ([ wickland96thirty ]) into
	  a container using <code class="function">push</code>. It measures the average time
	  for <code class="function">push</code> as a function of the number of values
	  pushed.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/priority_queue_text_push_timing.cc</code>
	  </p><p>The test checks the effect of different underlying data
	  structures.
	  </p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_push.results"></a>
	    Results
	  </h6></div></div></div><p>The two graphics below show the results for the native
	  priority_queues and this library's priority_queues.
	  </p><p>The graphic immediately below shows the results for the
	  native priority_queue type instantiated with different underlying
	  container types versus several different versions of library's
	  priority_queues.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_text_push.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_vector
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::vector</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_deque
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::deque</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binary_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binary_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rc_binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rc_binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    thin_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">thin_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div><p>The graphic below shows the results for the binary-heap
	  based native priority queues and this library's pairing-heap
	  priority_queue data structures.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_pairing_priority_queue_text_push.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_vector
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::vector</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_deque
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::deque</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    thin_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">thin_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_push.observations"></a>
	    Observations
	  </h6></div></div></div><p>Pairing heaps (<code class="classname">priority_queue</code> with
	  <code class="classname">Tag</code> = <code class="classname">pairing_heap_tag</code>)
	  are the most suited for sequences of <code class="function">push</code> and
	  <code class="function">pop</code> operations of non-primitive types (e.g.
	  <code class="classname">std::string</code>s). (See Priority Queue
	  Text <code class="function">push</code> and <code class="function">pop</code> Timing Test.) They are
	  less constrained than binomial heaps, e.g., and since
	  they are node-based, they outperform binary heaps. (See
	  Priority
	  Queue Random Integer <code class="function">push</code> Timing Test for the case
	  of primitive types.)</p><p>The standard's priority queues do not seem to perform well in
	  this case: the <code class="classname">std::vector</code> implementation needs to
	  perform a logarithmic sequence of string operations for each
	  operation, and the deque implementation is possibly hampered by
	  its need to manipulate a relatively-complex type (deques
	  support a O(1) <code class="function">push_front</code>, even though it is
	  not used by <code class="classname">std::priority_queue</code>.)</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.priority_queue.text_push_pop"></a>
	  Text <code class="function">push</code> and <code class="function">pop</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_push_pop.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with keys from an
	  arbitrary text ([ wickland96thirty ]) into
	  a container using <code class="classname">push</code> , then removes them using
	  <code class="classname">pop</code> . It measures the average time for <code class="classname">push</code>
	  as a function of the number of values.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/priority_queue_text_push_pop_timing.cc</code>
	  </p><p>The test checks the effect of different underlying data
	  structures.
	  </p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_push_pop.results"></a>
	    Results
	  </h6></div></div></div><p>The two graphics below show the results for the native
	  priority_queues and this library's priority_queues.
	  </p><p>The graphic immediately below shows the results for the
	  native priority_queue type instantiated with different underlying
	  container types versus several different versions of library's
	  priority_queues.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_text_push_pop.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_vector
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::vector</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_deque
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::deque</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binary_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binary_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rc_binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rc_binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    thin_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">thin_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div><p>The graphic below shows the results for the native priority
	  queues and this library's pairing-heap priority_queue data
	  structures.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_pairing_priority_queue_text_push_pop.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_vector
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code> adapting <code class="classname">std::vector</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::vector</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_deque
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::deque</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_push_pop.observations"></a>
	    Observations
	  </h6></div></div></div><p>These results are very similar to Priority Queue Text
	  <code class="function">push</code> Timing Test. As stated there, pairing heaps
	  (<code class="classname">priority_queue</code> with
	  <code class="classname">Tag</code>
	  = <code class="classname">pairing_heap_tag</code>) are most suited
	  for <code class="function">push</code> and <code class="function">pop</code>
	  sequences of non-primitive types such as strings. Observing these
	  two tests, one can note that a pairing heap outperforms the others
	  in terms of <code class="function">push</code> operations, but equals
	  binary heaps (<code class="classname">priority_queue</code> with
	  <code class="classname">Tag</code>
	  = <code class="classname">binary_heap_tag</code>) if the number
	  of <code class="function">push</code> and <code class="function">pop</code>
	  operations is equal. As the number of <code class="function">pop</code>
	  operations is at most equal to the number
	  of <code class="function">push</code> operations, pairing heaps are better
	  in this case. See Priority Queue Random
	  Integer <code class="function">push</code> and <code class="function">pop</code>
	  Timing Test for a case which is different.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.priority_queue.int_push"></a>
	  Integer <code class="function">push</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.int_push.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with integer keys
	  into a container using <code class="function">push</code>. It
	  measures the average time for <code class="function">push</code> as a
	  function of the number of values.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/priority_queue_random_int_push_timing.cc</code>
	  </p><p>The test checks the effect of different underlying data
	  structures.
	  </p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.int_push.results"></a>
	    Results
	  </h6></div></div></div><p>The two graphics below show the results for the native
	  priority_queues and this library's priority_queues.
	  </p><p>The graphic immediately below shows the results for the
	  native priority_queue type instantiated with different underlying
	  container types versus several different versions of library's
	  priority_queues.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_int_push.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_vector
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::vector</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_deque
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::deque</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binary_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binary_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rc_binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rc_binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    thin_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">thin_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div><p>The graphic below shows the results for the binary-heap
	  based native priority queues and this library's
	  priority_queue data structures.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_binary_priority_queue_int_push.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_vector
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code> adapting <code class="classname">std::vector</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::vector</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_deque
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::deque</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binary_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binary_heap_tag</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.int_push.observations"></a>
	    Observations
	  </h6></div></div></div><p>Binary heaps are the most suited for sequences of
	  <code class="function">push</code> and <code class="function">pop</code> operations of primitive types
	  (e.g. <span class="type">int</span>s). They are less constrained
	  than any other type, and since it is very efficient to store
	  such types in arrays, they outperform even pairing heaps. (See
	  Priority
	  Queue Text <code class="function">push</code> Timing Test for the case of
	  non-primitive types.)</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.priority_queue.int_push_pop"></a>
	  Integer <code class="function">push</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.int_push_pop.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with integer keys
	  into a container using <code class="function">push</code> , then removes them
	  using <code class="function">pop</code> . It measures the average time for
	  <code class="function">push</code> and <code class="function">pop</code> as a function
	  of the number of values.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/priority_queue_random_int_push_pop_timing.cc</code>
	  </p><p>The test checks the effect of different underlying data
	  structures.
	  </p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.int_push_pop.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic immediately below shows the results for the
	  native priority_queue type instantiated with different underlying
	  container types versus several different versions of library's
	  priority_queues.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_int_push_pop.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_vector
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::vector</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_deque
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::deque</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binary_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binary_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rc_binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rc_binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    thin_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">thin_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.int_push_pop.observations"></a>
	    Observations
	  </h6></div></div></div><p>Binary heaps are the most suited for sequences of
	  <code class="function">push</code> and <code class="function">pop</code> operations of primitive types
	  (e.g. <span class="type">int</span>s). This is explained in
	  Priority
	  Queue Random Int <code class="function">push</code> Timing Test. (See Priority Queue
	  Text <code class="function">push</code> Timing Test for the case of primitive
	  types.)</p><p>At first glance it seems that the standard's vector-based
	  priority queue is approximately on par with this
	  library's corresponding priority queue. There are two
	  differences however:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>The standard's priority queue does not downsize the underlying
	    vector (or deque) as the priority queue becomes smaller
	    (see Priority Queue
	    Text <code class="function">pop</code> Memory Use Test). It is therefore
	    gaining some speed at the expense of space.</p></li><li class="listitem"><p>From Priority Queue Random
	    Integer <code class="function">push</code> and <code class="function">pop</code>
	    Timing Test, it seems that the standard's priority queue is
	    slower in terms of <code class="function">push</code> operations. Since
	    the number of
	    <code class="function">pop</code> operations is at most that of <code class="function">push</code>
	    operations, the test here is the "best" for the standard's
	    priority queue.</p></li></ol></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.priority_queue.text_pop"></a>
	  Text <code class="function">pop</code> Memory Use
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_pop.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with keys from an
	  arbitrary text ([ wickland96thirty ]) into
	  a container, then pops them until only one is left in the
	  container. It measures the memory use as a function of the
	  number of values pushed to the container.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/priority_queue_text_pop_mem_usage.cc</code>
	  </p><p>The test checks the effect of different underlying data
	  structures.
	  </p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_pop.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic immediately below shows the results for the
	  native priority_queue type instantiated with different underlying
	  container types versus several different versions of library's
	  priority_queues.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_text_pop_mem.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_vector
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::vector</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_deque
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::deque</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binary_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binary_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rc_binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rc_binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    thin_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">thin_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_pop.observations"></a>
	    Observations
	  </h6></div></div></div><p>The priority queue implementations (excluding the standard's) use
	  memory proportionally to the number of values they hold:
	  node-based implementations (e.g., a pairing heap) do so
	  naturally; this library's binary heap de-allocates memory when
	  a certain lower threshold is exceeded.</p><p>Note from Priority Queue Text <code class="function">push</code>
	  and <code class="function">pop</code> Timing Test and Priority Queue
	  Random Integer <code class="function">push</code>
	  and <code class="function">pop</code> Timing Test that this does not
	  impede performance compared to the standard's priority
	  queues.</p><p>See Hash-Based Erase
	  Memory Use Test for a similar phenomenon regarding priority
	  queues.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.priority_queue.text_join"></a>
	  Text <code class="function">join</code>
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_join.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with keys from an
	  arbitrary text ([ wickland96thirty ]) into
	  two containers, then merges the containers. It uses
	  <code class="function">join</code> for this library's priority queues; for
	  the standard's priority queues, it successively pops values from
	  one container and pushes them into the other. The test measures
	  the average time as a function of the number of values.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/priority_queue_text_join_timing.cc</code>
	  </p><p>The test checks the effect of different underlying data
	  structures.
	  </p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_join.results"></a>
	    Results
	  </h6></div></div></div><p>The graphic immediately below shows the results for the
	  native priority_queue type instantiated with different underlying
	  container types versus several different versions of library's
	  priority_queues.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_text_join.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_vector
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::vector</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_deque
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::deque</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binary_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binary_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rc_binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rc_binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    thin_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">thin_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_join.observations"></a>
	    Observations
	  </h6></div></div></div><p>In this test the node-based heaps perform <code class="function">join</code> in
	  either logarithmic or constant time. The binary heap requires
	  linear time, since the well-known heapify algorithm [clrs2001] is linear.</p><p>It would be possible to apply the heapify algorithm to the
	  standard containers, if they would support iteration (which they
	  don't). Barring iterators, it is still somehow possible to perform
	  linear-time merge on a <code class="classname">std::vector</code>-based
	  standard priority queue, using <code class="function">top()</code>
	  and <code class="function">size()</code> (since they are enough to expose
	  the underlying array), but this is impossible for
	  a <code class="classname">std::deque</code>-based standard priority queue.
	  Without heapify, the cost is super-linear.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.priority_queue.text_modify_up"></a>
	  Text <code class="function">modify</code> Up
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_modify_up.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with keys from an
	  arbitrary text ([ wickland96thirty ]) into
	  into a container then modifies each one "up" (i.e., it
	  makes it larger). It uses <code class="function">modify</code> for this library's
	  priority queues; for the standard's priority queues, it pops values
	  from a container until it reaches the value that should be
	  modified, then pushes values back in. It measures the average
	  time for <code class="function">modify</code> as a function of the number of
	  values.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/priority_queue_text_modify_up_timing.cc</code>
	  </p><p>The test checks the effect of different underlying data
	  structures for graph algorithms settings.  Note that making an
	  arbitrary value larger (in the sense of the priority queue's
	  comparison functor) corresponds to decrease-key in standard graph
	  algorithms [clrs2001].
	  </p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_modify_up.results"></a>
	    Results
	  </h6></div></div></div><p>The two graphics below show the results for the native
	  priority_queues and this library's priority_queues.
	  </p><p>The graphic immediately below shows the results for the
	  native priority_queue type instantiated with different underlying
	  container types versus several different versions of library's
	  priority_queues.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_text_modify_up.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_vector
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::vector</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_deque
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::deque</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binary_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binary_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rc_binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rc_binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    thin_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">thin_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div><p>The graphic below shows the results for the
	  native priority queues and this library's pairing and thin heap
	  priority_queue data structures.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_pairing_priority_queue_text_modify_up_thin.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    thin_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">thin_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_modify_up.observations"></a>
	    Observations
	  </h6></div></div></div><p>As noted above, increasing an arbitrary value (in the sense of
	  the priority queue's comparison functor) is very common in
	  graph-related algorithms. In this case, a thin heap
	  (<code class="classname">priority_queue</code> with
	  <code class="classname">Tag</code> = <code class="classname">thin_heap_tag</code>)
	  outperforms a pairing heap (<code class="classname">priority_queue</code> with
	  <code class="classname">Tag</code> = <code class="classname">pairing_heap_tag</code>).
	  Conversely, Priority Queue Text
	  <code class="function">push</code> Timing Test, Priority Queue
	  Text <code class="function">push</code> and <code class="function">pop</code> Timing Test, Priority
	  Queue Random Integer <code class="function">push</code> Timing Test, and
	  Priority
	  Queue Random Integer <code class="function">push</code> and <code class="function">pop</code> Timing
	  Test show that the situation is reversed for other
	  operations. It is not clear when to prefer one of these two
	  different types.</p><p>In this test this library's binary heaps
	  effectively perform modify in linear time. As explained in
	  Priority Queue Design::Traits, given a valid point-type iterator,
	  a binary heap can perform
	  <code class="function">modify</code> logarithmically. The problem is that binary
	  heaps invalidate their find iterators with each modifying
	  operation, and so the only way to obtain a valid point-type
	  iterator is to iterate using a range-type iterator until
	  finding the appropriate value, then use the range-type iterator
	  for the <code class="function">modify</code> operation.</p><p>The explanation for the standard's priority queues' performance
	  is similar to that in Priority Queue Text
	  <code class="function">join</code> Timing Test.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="performance.priority_queue.text_modify_down"></a>
	  Text <code class="function">modify</code> Down
	</h5></div></div></div><p></p><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_modify_down.info"></a>
	    Description
	  </h6></div></div></div><p>This test inserts a number of values with keys from an
	  arbitrary text ([ wickland96thirty ]) into
	  into a container then modifies each one "down" (i.e., it
	  makes it smaller). It uses <code class="function">modify</code> for this library's
	  priority queues; for the standard's priority queues, it pops values
	  from a container until it reaches the value that should be
	  modified, then pushes values back in. It measures the average
	  time for <code class="function">modify</code> as a function of the number of
	  values.</p><p>
	    It uses the test file:
	    <code class="filename">performance/ext/pb_ds/priority_queue_text_modify_down_timing.cc</code>
	  </p><p>The main purpose of this test is to contrast Priority Queue
	  Text <code class="classname">modify</code> Up Timing Test.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_modify_down.results"></a>
	    Results
	  </h6></div></div></div><p>The two graphics below show the results for the native
	  priority_queues and this library's priority_queues.
	  </p><p>The graphic immediately below shows the results for the
	  native priority_queue type instantiated with different underlying
	  container types versus several different versions of library's
	  priority_queues.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_priority_queue_text_modify_down.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_vector
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::vector</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    n_pq_deque
		  </td></tr><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Sequence</code>
		  </td><td align="left">
		    <code class="classname">std::deque</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binary_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binary_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    rc_binomial_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">rc_binomial_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    thin_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">thin_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div><p>The graphic below shows the results for the
	  native priority queues and this library's pairing and thin heap
	  priority_queue data structures.
	  </p><div class="informalfigure"><div class="mediaobject" align="center"><img src="../images/pbds_pairing_priority_queue_text_modify_down_thin.png" align="middle" /></div></div><p>
	    The abbreviated names in the legend of the graphic above are
	    instantiated with the types in the following table.
	  </p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /></colgroup><thead><tr><th align="left"><span class="emphasis"><em>Name/Instantiating Type</em></span></th><th align="left"><span class="emphasis"><em>Parameter</em></span></th><th align="left"><span class="emphasis"><em>Details</em></span></th></tr></thead><tbody><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    thin_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">thin_heap_tag</code>
		  </td></tr><tr bgcolor="#B0B0B0"><td colspan="3" align="left">
		    pairing_heap
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		  </td><td align="left">
		    <code class="classname">Tag</code>
		  </td><td align="left">
		    <code class="classname">pairing_heap_tag</code>
		  </td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="priority_queue.text_modify_down.observations"></a>
	    Observations
	  </h6></div></div></div><p>Most points in these results are similar to Priority Queue
	  Text <code class="function">modify</code> Up Timing Test.</p><p>It is interesting to note, however, that as opposed to that
	  test, a thin heap (<code class="classname">priority_queue</code> with
	  <code class="classname">Tag</code> = <code class="classname">thin_heap_tag</code>) is
	  outperformed by a pairing heap (<code class="classname">priority_queue</code> with
	  <code class="classname">Tag</code> = <code class="classname">pairing_heap_tag</code>).
	  In this case, both heaps essentially perform an <code class="function">erase</code>
	  operation followed by a <code class="function">push</code> operation. As the other
	  tests show, a pairing heap is usually far more efficient than a
	  thin heap, so this is not surprising.</p><p>Most algorithms that involve priority queues increase values
	  (in the sense of the priority queue's comparison functor), and
	  so Priority Queue
	  Text <code class="classname">modify</code> Up Timing Test - is more interesting
	  than this test.</p></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="pbds.test.performance.observations"></a>Observations</h4></div></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="observations.associative"></a>Associative</h5></div></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="observations.associative.underlying"></a>
	    Underlying Data-Structure Families
	  </h6></div></div></div><p>In general, hash-based containers have better timing performance
	  than containers based on different underlying-data structures. The
	  main reason to choose a tree-based or trie-based container is if a
	  byproduct of the tree-like structure is required: either
	  order-preservation, or the ability to utilize node invariants. If
	  memory-use is the major factor, an ordered-vector tree gives
	  optimal results (albeit with high modificiation costs), and a
	  list-based container gives reasonable results.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="observations.associative.hash"></a>
	    Hash-Based Containers
	  </h6></div></div></div><p>Hash-based containers are typically either collision
	  chaining or probing. Collision-chaining
	  containers are more flexible internally, and so offer better
	  timing performance. Probing containers, if used for simple
	  value-types, manage memory more efficiently (they perform far
	  fewer allocation-related calls). In general, therefore, a
	  collision-chaining table should be used. A probing container,
	  conversely, might be used efficiently for operations such as
	  eliminating duplicates in a sequence, or counting the number of
	  occurrences within a sequence. Probing containers might be more
	  useful also in multithreaded applications where each thread
	  manipulates a hash-based container: in the standard, allocators have
	  class-wise semantics (see [meyers96more] - Item 10); a
	  probing container might incur less contention in this case.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="observations.associative.hash_policies"></a>
	    Hash Policies
	  </h6></div></div></div><p>In hash-based containers, the range-hashing scheme seems to
	  affect performance more than other considerations. In most
	  settings, a mask-based scheme works well (or can be made to
	  work well). If the key-distribution can be estimated a-priori,
	  a simple hash function can produce nearly uniform hash-value
	  distribution. In many other cases (e.g., text hashing,
	  floating-point hashing), the hash function is powerful enough
	  to generate hash values with good uniformity properties
	  [knuth98sorting];
	  a modulo-based scheme, taking into account all bits of the hash
	  value, appears to overlap the hash function in its effort.</p><p>The range-hashing scheme determines many of the other
	  policies. A mask-based scheme works
	  well with an exponential-size policy; for
	  probing-based containers, it goes well with a linear-probe
	  function.</p><p>An orthogonal consideration is the trigger policy. This
	  presents difficult tradeoffs. E.g., different load
	  factors in a load-check trigger policy yield a
	  space/amortized-cost tradeoff.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="observations.associative.branch"></a>
	    Branch-Based Containers
	  </h6></div></div></div><p>In general, there are several families of tree-based
	  underlying data structures: balanced node-based trees
	  (e.g., red-black or AVL trees), high-probability
	  balanced node-based trees (e.g., random treaps or
	  skip-lists), competitive node-based trees (e.g., splay
	  trees), vector-based "trees", and tries. (Additionally, there
	  are disk-residing or network-residing trees, such as B-Trees
	  and their numerous variants. An interface for this would have
	  to deal with the execution model and ACID guarantees; this is
	  out of the scope of this library.) Following are some
	  observations on their application to different settings.</p><p>Of the balanced node-based trees, this library includes a
	  red-black tree, as does standard (in
	  practice). This type of tree is the "workhorse" of tree-based
	  containers: it offers both reasonable modification and
	  reasonable lookup time. Unfortunately, this data structure
	  stores a huge amount of metadata. Each node must contain,
	  besides a value, three pointers and a boolean. This type might
	  be avoided if space is at a premium [austern00noset].</p><p>High-probability balanced node-based trees suffer the
	  drawbacks of deterministic balanced trees. Although they are
	  fascinating data structures, preliminary tests with them showed
	  their performance was worse than red-black trees. The library
	  does not contain any such trees, therefore.</p><p>Competitive node-based trees have two drawbacks. They are
	  usually somewhat unbalanced, and they perform a large number of
	  comparisons. Balanced trees perform one comparison per each
	  node they encounter on a search path; a splay tree performs two
	  comparisons. If the keys are complex objects, e.g.,
	  <code class="classname">std::string</code>, this can increase the running time.
	  Conversely, such trees do well when there is much locality of
	  reference. It is difficult to determine in which case to prefer
	  such trees over balanced trees. This library includes a splay
	  tree.</p><p>Ordered-vector trees use very little space
	  [austern00noset].
	  They do not have any other advantages (at least in this
	  implementation).</p><p>Large-fan-out PATRICIA tries have excellent lookup
	  performance, but they do so through maintaining, for each node,
	  a miniature "hash-table". Their space efficiency is low, and
	  their modification performance is bad. These tries might be
	  used for semi-static settings, where order preservation is
	  important. Alternatively, red-black trees cross-referenced with
	  hash tables can be used. [okasaki98mereable]
	  discusses small-fan-out PATRICIA tries for integers, but the
	  cited results seem to indicate that the amortized cost of
	  maintaining such trees is higher than that of balanced trees.
	  Moderate-fan-out trees might be useful for sequences where each
	  element has a limited number of choices, e.g., DNA
	  strings.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="observations.associative.mapping_semantics"></a>
	    Mapping-Semantics
	  </h6></div></div></div><p>Different mapping semantics were discussed in the introduction and design sections.Here
	  the focus will be on the case where a keys can be composed into
	  primary keys and secondary keys. (In the case where some keys
	  are completely identical, it is trivial that one should use an
	  associative container mapping values to size types.) In this
	  case there are (at least) five possibilities:</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Use an associative container that allows equivalent-key
	    values (such as <code class="classname">std::multimap</code>)</p></li><li class="listitem"><p>Use a unique-key value associative container that maps
	    each primary key to some complex associative container of
	    secondary keys, say a tree-based or hash-based container.
	    </p></li><li class="listitem"><p>Use a unique-key value associative container that maps
	    each primary key to some simple associative container of
	    secondary keys, say a list-based container.</p></li><li class="listitem"><p>Use a unique-key value associative container that maps
	    each primary key to some non-associative container
	    (e.g., <code class="classname">std::vector</code>)</p></li><li class="listitem"><p>Use a unique-key value associative container that takes
	    into account both primary and secondary keys.</p></li></ol></div><p>Stated simply: there is a simple answer for this. (Excluding
	  option 1, which should be avoided in all cases).</p><p>If the expected ratio of secondary keys to primary keys is
	  small, then 3 and 4 seem reasonable. Both types of secondary
	  containers are relatively lightweight (in terms of memory use
	  and construction time), and so creating an entire container
	  object for each primary key is not too expensive. Option 4
	  might be preferable to option 3 if changing the secondary key
	  of some primary key is frequent - one cannot modify an
	  associative container's key, and the only possibility,
	  therefore, is erasing the secondary key and inserting another
	  one instead; a non-associative container, conversely, can
	  support in-place modification. The actual cost of erasing a
	  secondary key and inserting another one depends also on the
	  allocator used for secondary associative-containers (The tests
	  above used the standard allocator, but in practice one might
	  choose to use, e.g., [boost_pool]). Option 2 is
	  definitely an overkill in this case. Option 1 loses out either
	  immediately (when there is one secondary key per primary key)
	  or almost immediately after that. Option 5 has the same
	  drawbacks as option 2, but it has the additional drawback that
	  finding all values whose primary key is equivalent to some key,
	  might be linear in the total number of values stored (for
	  example, if using a hash-based container).</p><p>If the expected ratio of secondary keys to primary keys is
	  large, then the answer is more complicated. It depends on the
	  distribution of secondary keys to primary keys, the
	  distribution of accesses according to primary keys, and the
	  types of operations most frequent.</p><p>To be more precise, assume there are m primary keys,
	  primary key i is mapped to n<sub>i</sub>
	  secondary keys, and each primary key is mapped, on average, to
	  n secondary keys (i.e.,
	  E(n<sub>i</sub>) = n).</p><p>Suppose one wants to find a specific pair of primary and
	  secondary keys. Using 1 with a tree based container
	  (<code class="classname">std::multimap</code>), the expected cost is
	  E(Θ(log(m) + n<sub>i</sub>)) = Θ(log(m) +
	  n); using 1 with a hash-based container
	  (<code class="classname">std::tr1::unordered_multimap</code>), the expected cost is
	  Θ(n). Using 2 with a primary hash-based container
	  and secondary hash-based containers, the expected cost is
	  O(1); using 2 with a primary tree-based container and
	  secondary tree-based containers, the expected cost is (using
	  the Jensen inequality [motwani95random])
	  E(O(log(m) + log(n<sub>i</sub>)) = O(log(m)) +
	  E(O(log(n<sub>i</sub>)) = O(log(m)) + O(log(n)),
	  assuming that primary keys are accessed equiprobably. 3 and 4
	  are similar to 1, but with lower constants. Using 5 with a
	  hash-based container, the expected cost is O(1); using 5
	  with a tree based container, the cost is
	  E(Θ(log(mn))) = Θ(log(m) +
	  log(n)).</p><p>Suppose one needs the values whose primary key matches some
	  given key. Using 1 with a hash-based container, the expected
	  cost is Θ(n), but the values will not be ordered
	  by secondary keys (which may or may not be required); using 1
	  with a tree-based container, the expected cost is
	  Θ(log(m) + n), but with high constants; again the
	  values will not be ordered by secondary keys. 2, 3, and 4 are
	  similar to 1, but typically with lower constants (and,
	  additionally, if one uses a tree-based container for secondary
	  keys, they will be ordered). Using 5 with a hash-based
	  container, the cost is Θ(mn).</p><p>Suppose one wants to assign to a primary key all secondary
	  keys assigned to a different primary key. Using 1 with a
	  hash-based container, the expected cost is Θ(n),
	  but with very high constants; using 1 with a tree-based
	  container, the cost is Θ(nlog(mn)). Using 2, 3,
	  and 4, the expected cost is Θ(n), but typically
	  with far lower costs than 1. 5 is similar to 1.</p></div></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="observations.priority_queue"></a>Priority_Queue</h5></div></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="observations.priority_queue.complexity"></a>Complexity</h6></div></div></div><p>The following table shows the complexities of the different
	  underlying data structures in terms of orders of growth. It is
	  interesting to note that this table implies something about the
	  constants of the operations as well (see Amortized <code class="function">push</code>
	  and <code class="function">pop</code> operations).</p><div class="informaltable"><table border="1"><colgroup><col align="left" class="c1" /><col align="left" class="c2" /><col align="left" class="c3" /><col align="left" class="c4" /><col align="left" class="c5" /><col align="left" class="c6" /></colgroup><thead><tr><th align="left"> </th><th align="left"><span class="emphasis"><em><code class="function">push</code></em></span></th><th align="left"><span class="emphasis"><em><code class="function">pop</code></em></span></th><th align="left"><span class="emphasis"><em><code class="function">modify</code></em></span></th><th align="left"><span class="emphasis"><em><code class="function">erase</code></em></span></th><th align="left"><span class="emphasis"><em><code class="function">join</code></em></span></th></tr></thead><tbody><tr><td align="left">
		    <code class="classname">std::priority_queue</code>
		  </td><td align="left">
		    Θ(n) worst
		    Θ(log(n)) amortized
		  </td><td align="left">
		    Θ(log(n)) Worst
		  </td><td align="left">
		    Θ(n log(n)) Worst
		    <sub>[std note 1]</sub>
		  </td><td align="left">
		    Θ(n log(n))
		    <sub>[std note 2]</sub>
		  </td><td align="left">
		    Θ(n log(n))
		    <sub>[std note 1]</sub>
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		    &lt;<code class="classname">Tag</code> =
		    <code class="classname">pairing_heap_tag</code>&gt;
		  </td><td align="left">
		    O(1)
		  </td><td align="left">
		    Θ(n) worst
		    Θ(log(n)) amortized
		  </td><td align="left">
		    Θ(n) worst
		    Θ(log(n)) amortized
		  </td><td align="left">
		    Θ(n) worst
		    Θ(log(n)) amortized
		  </td><td align="left">
		    O(1)
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		    &lt;<code class="classname">Tag</code> =
		    <code class="classname">binary_heap_tag</code>&gt;
		  </td><td align="left">
		    Θ(n) worst
		    Θ(log(n)) amortized
		  </td><td align="left">
		    Θ(n) worst
		    Θ(log(n)) amortized
		  </td><td align="left">
		    Θ(n)
		  </td><td align="left">
		    Θ(n)
		  </td><td align="left">
		    Θ(n)
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		    &lt;<code class="classname">Tag</code> =
		    <code class="classname">binomial_heap_tag</code>&gt;
		  </td><td align="left">
		    Θ(log(n)) worst
		    O(1) amortized
		  </td><td align="left">
		    Θ(log(n))
		  </td><td align="left">
		    Θ(log(n))
		  </td><td align="left">
		    Θ(log(n))
		  </td><td align="left">
		    Θ(log(n))
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>
		    &lt;<code class="classname">Tag</code> =
		    <code class="classname">rc_binomial_heap_tag</code>&gt;
		  </td><td align="left">
		    O(1)
		  </td><td align="left">
		    Θ(log(n))
		  </td><td align="left">
		    Θ(log(n))
		  </td><td align="left">
		    Θ(log(n))
		  </td><td align="left">
		    Θ(log(n))
		  </td></tr><tr><td align="left">
		    <code class="classname">priority_queue</code>&lt;<code class="classname">Tag</code> =
		    <code class="classname">thin_heap_tag</code>&gt;
		  </td><td align="left">
		    O(1)
		  </td><td align="left">
		    Θ(n) worst
		    Θ(log(n)) amortized
		  </td><td align="left">
		    Θ(log(n)) worst
		    O(1) amortized,
		    or Θ(log(n)) amortized
		    <sub>[thin_heap_note]</sub>
		  </td><td align="left">
		    Θ(n) worst
		    Θ(log(n)) amortized
		  </td><td align="left">
		    Θ(n)
		  </td></tr></tbody></table></div><p>[std note 1] This
	  is not a property of the algorithm, but rather due to the fact
	  that the standard's priority queue implementation does not support
	  iterators (and consequently the ability to access a specific
	  value inside it). If the priority queue is adapting an
	  <code class="classname">std::vector</code>, then it is still possible to reduce this
	  to Θ(n) by adapting over the standard's adapter and
	  using the fact that <code class="function">top</code> returns a reference to the
	  first value; if, however, it is adapting an
	  <code class="classname">std::deque</code>, then this is impossible.</p><p>[std note 2] As
	  with [std note 1], this is not a
	  property of the algorithm, but rather the standard's implementation.
	  Again, if the priority queue is adapting an
	  <code class="classname">std::vector</code> then it is possible to reduce this to
	  Θ(n), but with a very high constant (one must call
	  <code class="function">std::make_heap</code> which is an expensive linear
	  operation); if the priority queue is adapting an
	  <code class="classname">std::deque</code>, then this is impossible.</p><p>[thin_heap_note] A thin heap has
	  Θ(log(n)) worst case <code class="function">modify</code> time
	  always, but the amortized time depends on the nature of the
	  operation: I) if the operation increases the key (in the sense
	  of the priority queue's comparison functor), then the amortized
	  time is O(1), but if II) it decreases it, then the
	  amortized time is the same as the worst case time. Note that
	  for most algorithms, I) is important and II) is not.</p></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="observations.priority_queue.amortized_ops"></a>
	    Amortized <code class="function">push</code>
	    and <code class="function">pop</code> operations
	  </h6></div></div></div><p>In many cases, a priority queue is needed primarily for
	  sequences of <code class="function">push</code> and <code class="function">pop</code> operations. All of
	  the underlying data structures have the same amortized
	  logarithmic complexity, but they differ in terms of
	  constants.</p><p>The table above shows that the different data structures are
	  "constrained" in some respects. In general, if a data structure
	  has lower worst-case complexity than another, then it will
	  perform slower in the amortized sense. Thus, for example a
	  redundant-counter binomial heap (<code class="classname">priority_queue</code> with
	  <code class="classname">Tag</code> = <code class="classname">rc_binomial_heap_tag</code>)
	  has lower worst-case <code class="function">push</code> performance than a binomial
	  heap (<code class="classname">priority_queue</code>
	  with <code class="classname">Tag</code> = <code class="classname">binomial_heap_tag</code>),
	  and so its amortized <code class="function">push</code> performance is slower in
	  terms of constants.</p><p>As the table shows, the "least constrained" underlying
	  data structures are binary heaps and pairing heaps.
	  Consequently, it is not surprising that they perform best in
	  terms of amortized constants.</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Pairing heaps seem to perform best for non-primitive
	    types (e.g., <code class="classname">std::string</code>s), as shown by
	    Priority
	    Queue Text <code class="function">push</code> Timing Test and Priority
	    Queue Text <code class="function">push</code> and <code class="function">pop</code> Timing
	    Test</p></li><li class="listitem"><p>binary heaps seem to perform best for primitive types
	    (e.g., <span class="type">int</span>s), as shown by Priority
	    Queue Random Integer <code class="function">push</code> Timing Test and
	    Priority
	    Queue Random Integer <code class="function">push</code> and <code class="function">pop</code> Timing
	    Test.</p></li></ol></div></div><div class="section"><div class="titlepage"><div><div><h6 class="title"><a id="observations.priority_queue.graphs"></a>
	    Graph Algorithms
	  </h6></div></div></div><p>In some graph algorithms, a decrease-key operation is
	  required [clrs2001];
	  this operation is identical to <code class="function">modify</code> if a value is
	  increased (in the sense of the priority queue's comparison
	  functor). The table above and Priority Queue
	  Text <code class="function">modify</code> Up Timing Test show that a thin heap
	  (<code class="classname">priority_queue</code> with
	  <code class="classname">Tag</code> = <code class="classname">thin_heap_tag</code>)
	  outperforms a pairing heap (<code class="classname">priority_queue</code> with
	  <code class="classname">Tag</code> = <code class="classname">Tag</code> = <code class="classname">pairing_heap_tag</code>),
	  but the rest of the tests show otherwise.</p><p>This makes it difficult to decide which implementation to use in
	  this case. Dijkstra's shortest-path algorithm, for example, requires
	  Θ(n) <code class="function">push</code> and <code class="function">pop</code> operations
	  (in the number of vertices), but O(n<sup>2</sup>)
	  <code class="function">modify</code> operations, which can be in practice Θ(n)
	  as well. It is difficult to find an a-priori characterization of
	  graphs in which the actual number of <code class="function">modify</code>
	  operations will dwarf the number of <code class="function">push</code> and
	  <code class="function">pop</code> operations.</p></div></div></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="policy_data_structures_design.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="policy_data_structures.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="policy_data_structures_ack.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Design </td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top"> Acknowledgments</td></tr></table></div></body></html>