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

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

https://bitbucket.org/pizzafactory/pf-gcc
HTML | 212 lines | 211 code | 1 blank | 0 comment | 0 complexity | e5494f9aab8fd00112cdfd0fdd8666fe 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>Hash-List "Multimap" Text Memory Use Test with Small
  7. Average 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 Memory Use 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 100 distinct primary keys, and the ratio of secondary keys
  24. to primary keys ranges to about 20.</p>
  25. <p>The test measures the memory use as a function of the number
  26. of values inserted.</p>
  27. <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_mem_usage_small.cc"><tt>multimap_text_insert_mem_usage_test</tt></a>
  28. thirty_years_among_the_dead_preproc.txt 100 3 4 4)</p>
  29. <h2><a name="purpose" id="purpose">Purpose</a></h2>
  30. <p>The test checks the memory scalability of different
  31. "multimap" designs (see <a href="motivation.html#assoc_mapping_semantics">Motivation::Associative
  32. Containers::Mapping Semantics</a>).</p>
  33. <h2><a name="results" id="results">Results</a></h2>
  34. <p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
  35. <a href="#NTL">NTL</a> show the results for "multimaps" which
  36. 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
  37. <a href="assoc_performance_tests.html#local"><u>local</u></a>,
  38. respectively; Figures <a href="#NHG"></a>NHG, <a href="#NHM">NHM</a>, and <a href="#NHL">NHL</a> show the results for
  39. "multimaps" which use a hash-based container for primary keys,
  40. in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>,
  41. <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>,
  42. and <a href="assoc_performance_tests.html#local"><u>local</u></a>,
  43. respectively.</p>
  44. <div id="NTG_res_div">
  45. <div id="NTG_gcc">
  46. <div id="NTG_multimap_text_insert_mem_usage_test_small_s2p_tree">
  47. <div id="NTG_assoc">
  48. <div id="NTG_Native_and_primary_tree-based_multimap_types_mem_usage_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_mem_usage_test_small_s2p_tree_gcc.png" alt="no image" /></a></h6>NTG: Native and primary tree-based multimap types mem usage 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>
  49. <ol>
  50. <li>
  51. rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
  52. <a href="tree.html"><tt>tree</tt></a>
  53. with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
  54. , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
  55. , mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  56. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  57. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  58. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  59. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  60. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  61. <li>
  62. n_mmap-
  63. <tt>std::multimap</tt></li>
  64. <li>
  65. rb_tree_mmap_lu_mtf_set-
  66. <a href="tree.html"><tt>tree</tt></a>
  67. with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
  68. , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
  69. , mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
  70. with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
  71. </li>
  72. </ol>
  73. </div><div style="width: 100%; height: 20px"></div></div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <div id="NTM_res_div">
  79. <div id="NTM_msvc">
  80. <div id="NTM_multimap_text_insert_mem_usage_test_small_s2p_tree">
  81. <div id="NTM_assoc">
  82. <div id="NHM_Native_and_primary_tree-based_multimap_types_mem_usage_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_mem_usage_test_small_s2p_tree_msvc.png" alt="no image" /></a></h6>NTM: NHM Native and primary tree-based multimap types mem usage 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>
  83. <ol>
  84. <li>
  85. rb_tree_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
  86. <a href="tree.html"><tt>tree</tt></a>
  87. with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
  88. , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
  89. , mapping each key to <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  90. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  91. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  92. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  93. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  94. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  95. <li>
  96. n_mmap-
  97. <tt>std::multimap</tt></li>
  98. <li>
  99. rb_tree_mmap_lu_mtf_set-
  100. <a href="tree.html"><tt>tree</tt></a>
  101. with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
  102. , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
  103. , mapping each key to <a href="list_update.html"><tt>list_update</tt></a>
  104. with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
  105. </li>
  106. </ol>
  107. </div><div style="width: 100%; height: 20px"></div></div>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <div id="NTL_res_div">
  113. <div id="NTL_local">
  114. <div id="NTL_multimap_text_insert_mem_usage_test_small_s2p_tree">
  115. <div id="NTL_assoc">
  116. <div id="NTL_Native_and_primary_tree-based_multimap_types_mem_usage_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_mem_usage_test_small_s2p_tree_local.png" alt="no image" /></a></h6>NTL: Native and primary tree-based multimap types mem usage test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <div id="NHG_res_div">
  122. <div id="NHG_gcc">
  123. <div id="NHG_multimap_text_insert_mem_usage_test_small_s2p_hash">
  124. <div id="NHG_assoc">
  125. <div id="NHG_Native_and_primary_hash-based_multimap_types_mem_usage_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_mem_usage_test_small_s2p_hash_gcc.png" alt="no image" /></a></h6>NHG: Native and primary hash-based multimap types mem usage 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>
  126. <ol>
  127. <li>
  128. cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
  129. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  130. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  131. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  132. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  133. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  134. 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>
  135. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  136. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  137. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  138. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  139. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  140. <li>
  141. n_hash_mmap-
  142. <tt>__gnucxx::hash_multimap</tt></li>
  143. <li>
  144. cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
  145. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  146. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  147. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  148. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  149. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  150. 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>
  151. with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
  152. </li>
  153. </ol>
  154. </div><div style="width: 100%; height: 20px"></div></div>
  155. </div>
  156. </div>
  157. </div>
  158. </div>
  159. <div id="NHM_res_div">
  160. <div id="NHM_msvc">
  161. <div id="NHM_multimap_text_insert_mem_usage_test_small_s2p_hash">
  162. <div id="NHM_assoc">
  163. <div id="NHM_Native_and_primary_hash-based_multimap_types_mem_usage_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_mem_usage_test_small_s2p_hash_msvc.png" alt="no image" /></a></h6>NHM: Native and primary hash-based multimap types mem usage 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>
  164. <ol>
  165. <li>
  166. cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_set-
  167. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  168. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  169. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  170. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  171. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  172. 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>
  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></li>
  178. <li>
  179. n_hash_mmap-
  180. <tt>stdext::hash_multimap</tt></li>
  181. <li>
  182. cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_mmap_lu_mtf_set-
  183. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  184. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  185. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  186. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  187. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  188. 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>
  189. with <tt>Update_Policy</tt> = <a href="move_to_front_lu_policy.html"><tt>move_to_front_lu_policy</tt></a>
  190. </li>
  191. </ol>
  192. </div><div style="width: 100%; height: 20px"></div></div>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. <div id="NHL_res_div">
  198. <div id="NHL_local">
  199. <div id="NHL_multimap_text_insert_mem_usage_test_small_s2p_hash">
  200. <div id="NHL_assoc">
  201. <div id="NHL__Native_and_primary_hash-based_multimap_types_mem_usage_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_mem_usage_test_small_s2p_hash_local.png" alt="no image" /></a></h6>NHL: Native and primary hash-based multimap types mem usage test - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
  202. </div>
  203. </div>
  204. </div>
  205. </div>
  206. <h2><a name="observations" id="observations">Observations</a></h2>
  207. <p>See <a href="assoc_performance_tests.html#msc">Observations::Mapping-Semantics
  208. Considerations</a>.</p>
  209. </div>
  210. </body>
  211. </html>