PageRenderTime 33ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/libstdc++-v3/doc/html/ext/pb_ds/multimap_text_insert_timing_test_small.html

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