2008-01-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / libstdc++-v3 / docs / html / ext / pb_ds / multimap_text_find_timing_test_small.html
blobcec52ff80904a30bd87bf66d600d0aca8225921d
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <head>
6 <meta name="generator" content="HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
7 <title>"Multimap" Text Find Timing Test with Small Average
8 Secondary-Key to Primary-Key Ratio</title>
9 <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
10 </head>
11 <body>
12 <div id="page">
13 <h1>"Multimap" Text Find Timing Test with Small Average
14 Secondary-Key to Primary-Key Ratio</h1>
15 <h2><a name="description" id="description">Description</a></h2>
16 <p>This test inserts a number of pairs into a container. The
17 first item of each pair is a string from an arbitrary text
18 [<a href="references.html#wickland96thirty">wickland96thirty</a>], and
19 the second is a uniform i.i.d.integer. The container is a
20 "multimap" - it considers the first member of each pair as a
21 primary key, and the second member of each pair as a secondary
22 key (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
23 Containers::Alternative to Multiple Equivalent Keys</a>). There
24 are 400 distinct primary keys, and the ratio of secondary keys
25 to primary keys ranges from 1 to 5.</p>
26 <p>The test measures the average find-time as a function of the
27 number of values inserted. For <tt>pb_ds</tt>'s containers, it
28 finds the secondary key from a container obtained from finding
29 a primary key. For the native multimaps, it searches a range
30 obtained using <tt>std::equal_range</tt> on a primary key.</p>
31 <p>(The test was executed with <a href="../../../../testsuite/performance/ext/pb_ds/multimap_text_find_timing.cc"><tt>multimap_text_find_timing_test</tt></a>
32 thirty_years_among_the_dead_preproc.txt 400 1 1 6)</p>
33 <h2><a name="purpose" id="purpose">Purpose</a></h2>
34 <p>The test checks the find-time scalability of different
35 "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
36 Containers::Mapping Semantics</a>).</p>
37 <h2><a name="results" id="results">Results</a></h2>
38 <p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
39 <a href="#NTL">NTL</a> show the results for "multimaps" which
40 use a tree-based container for primary keys, in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
41 <a href="assoc_performance_tests.html#local"><u>local</u></a>,
42 respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
43 "multimaps" which use a hash-based container for primary keys,
44 in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
45 <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
46 and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
47 respectively.</p>
48 <div id="NTG_res_div">
49 <div id="NTG_gcc">
50 <div id="NTG_multimap_text_find_timing_test_small_s2p_tree">
51 <div id="NTG_assoc">
52 <div id="NHG_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="multimap_text_find_timing_test_small_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: NHG Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
53 <ol>
54 <li>
55 n_mmap-
56 <tt>std::multimap</tt></li>
57 <li>
58 rb_tree_mmap_lu_mtf_set-
59 <a href="tree.html"><tt>tree</tt></a>
60 with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
61 , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
62 , mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
63 with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
64 </li>
65 <li>
66 rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
67 <a href="tree.html"><tt>tree</tt></a>
68 with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
69 , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
70 , mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
71 with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
72 , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
73 with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
74 , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
75 with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
76 </ol>
77 </div><div style="width: 100%; height: 20px"></div></div>
78 </div>
79 </div>
80 </div>
81 </div>
82 <div id="NTM_res_div">
83 <div id="NTM_msvc">
84 <div id="NTM_multimap_text_find_timing_test_small_s2p_tree">
85 <div id="NTM_assoc">
86 <div id="NHM_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="multimap_text_find_timing_test_small_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
87 <ol>
88 <li>
89 n_mmap-
90 <tt>std::multimap</tt></li>
91 <li>
92 rb_tree_mmap_lu_mtf_set-
93 <a href="tree.html"><tt>tree</tt></a>
94 with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
95 , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
96 , mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
97 with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
98 </li>
99 <li>
100 rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
101 <a href="tree.html"><tt>tree</tt></a>
102 with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
103 , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
104 , mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
105 with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
106 , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
107 with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
108 , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
109 with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
110 </ol>
111 </div><div style="width: 100%; height: 20px"></div></div>
112 </div>
113 </div>
114 </div>
115 </div>
116 <div id="NTL_res_div">
117 <div id="NTL_local">
118 <div id="NTL_multimap_text_find_timing_test_small_s2p_tree">
119 <div id="NTL_assoc">
120 <div id="NTL_Native_and_primary_tree-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="multimap_text_find_timing_test_small_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
121 </div>
122 </div>
123 </div>
124 </div>
125 <div id="NHG_res_div">
126 <div id="NHG_gcc">
127 <div id="NHG_multimap_text_find_timing_test_small_s2p_hash">
128 <div id="NHG_assoc">
129 <div id="NHG_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHG" id="NHG"><img src="multimap_text_find_timing_test_small_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
130 <ol>
131 <li>
132 n_hash_mmap-
133 <tt>__gnucxx::hash_multimap</tt></li>
134 <li>
135 cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
136 <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
137 with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
138 , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
139 with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
140 , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
141 with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
142 with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
143 </li>
144 <li>
145 cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
146 <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
147 with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
148 , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
149 with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
150 , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
151 with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
152 with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
153 , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
154 with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
155 , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
156 with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
157 </ol>
158 </div><div style="width: 100%; height: 20px"></div></div>
159 </div>
160 </div>
161 </div>
162 </div>
163 <div id="NHM_res_div">
164 <div id="NHM_msvc">
165 <div id="NHM_multimap_text_find_timing_test_small_s2p_hash">
166 <div id="NHM_assoc">
167 <div id="NHM_Native_and_primary_hash-based_multimap_types_find_timing_test"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHM" id="NHM"><img src="multimap_text_find_timing_test_small_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types find timing test - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
168 <ol>
169 <li>
170 n_hash_mmap-
171 <tt>stdext::hash_multimap</tt></li>
172 <li>
173 cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
174 <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
175 with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
176 , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
177 with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
178 , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
179 with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
180 with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
181 </li>
182 <li>
183 cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
184 <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
185 with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
186 , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
187 with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
188 , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
189 with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
190 with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
191 , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
192 with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
193 , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
194 with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
195 </ol>
196 </div><div style="width: 100%; height: 20px"></div></div>
197 </div>
198 </div>
199 </div>
200 </div>
201 <div id="NHL_res_div">
202 <div id="NHL_local">
203 <div id="NHL_multimap_text_find_timing_test_small_s2p_hash">
204 <div id="NHL_assoc">
205 <div id="NHL__Native_and_primary_hash-based_multimap_types_find_timing_test"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NHL" id= "NHL"><img src="multimap_text_find_timing_test_small_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types find timing test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
206 </div>
207 </div>
208 </div>
209 </div>
210 <h2><a name="observations" id="observations">Observations</a></h2>
211 <p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
212 Considerations</a>.</p>
213 </div>
214 </body>
215 </html>