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

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

https://bitbucket.org/pizzafactory/pf-gcc
HTML | 365 lines | 364 code | 1 blank | 0 comment | 0 complexity | bcea57c8989541e0b824b70cbea01f21 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 Random Int Subscript Insert Timing Test</title>
  7. <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
  8. </head>
  9. <body>
  10. <div id="page">
  11. <h1>Hash-Based Random-Integer <tt><b>operator</b>[]</tt> Insert
  12. Timing Test</h1>
  13. <h2><a name="description" id="description">Description</a></h2>
  14. <p>This test inserts a number of values with uniform i.i.d.
  15. integer keys into a container, using
  16. <tt><b>operator</b>[]</tt>. It measures the average time for
  17. <tt><b>operator</b>[]</tt> as a function of the number of
  18. values inserted.</p>
  19. <p>(The test was executed with <a href="http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/performance/ext/pb_ds/random_int_subscript_insert_timing.cc"><tt>hash_random_int_subscript_insert_timing_test</tt></a>
  20. 200 200 2100)</p>
  21. <h2><a name="purpose" id="purpose">Purpose</a></h2>
  22. <p>The test primarily checks the effect of different underlying
  23. hash-tables (see <a href="hash_based_containers.html">Design::Associative
  24. Containers::Associative Containers::Hash-Based
  25. Containers</a>).</p>
  26. <h2><a name="results" id="results">Results</a></h2>
  27. <p>Figures <a href="#NCCG">NCCG</a>, <a href="#NCCM">NCCM</a>,
  28. and <a href="#NCCL">NCCL</a> show the results for the native
  29. and collision-chaining types in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>MSVC++</u></a>, and
  30. <a href="assoc_performance_tests.html#local"><u>local</u></a>,
  31. respectively; Figures <a href="#NGPG">NGPG</a>, <a href="#NGPM">NGPM</a>, and <a href="#NGPL">NGPL</a> show the results
  32. for the native and probing types in <a href="assoc_performance_tests.html#gcc"><u>g++</u></a>, <a href="assoc_performance_tests.html#msvc"><u>msvc++</u></a>, and
  33. <a href="assoc_performance_tests.html#local"><u>local</u></a>
  34. respectively; Figures <a href="#CCGPG">CCGPG</a>, <a href="#CCGPM">CCGPM</a>, and <a href="#CCGPL">CCGPL</a> compare the
  35. results for the collision-chaining and probing types of
  36. <tt>pb_ds</tt> only, 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.</p>
  39. <div id="NCCG_res_div">
  40. <div id="NCCG_gcc">
  41. <div id="NCCG_cc_hash_random_int_subscript_timing_test_insert">
  42. <div id="NCCG_assoc">
  43. <div id="NCCG_Native_and_collision-chaining_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCG" id="NCCG"><img src="cc_hash_random_int_subscript_timing_test_insert_gcc.png" alt="no image" /></a></h6>NCCG: Native and collision-chaining hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
  44. <ol>
  45. <li>
  46. cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
  47. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  48. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  49. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  50. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  51. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  52. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  53. <li>
  54. n_hash_map_ncah-
  55. <tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
  56. <li>
  57. cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
  58. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  59. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  60. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  61. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  62. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  63. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  64. <li>
  65. cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
  66. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  67. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  68. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  69. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  70. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  71. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
  72. <li>
  73. cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
  74. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  75. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  76. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  77. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  78. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  79. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
  80. </ol>
  81. </div><div style="width: 100%; height: 20px"></div></div>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. <div id="NCCM_res_div">
  87. <div id="NCCM_msvc">
  88. <div id="NCCM_cc_hash_random_int_subscript_timing_test_insert">
  89. <div id="NCCM_assoc">
  90. <div id="NCCM_Native_and_collision-chaining_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCM" id="NCCM"><img src="cc_hash_random_int_subscript_timing_test_insert_msvc.png" alt="no image" /></a></h6>NCCM: Native and collision-chaining hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
  91. <ol>
  92. <li>
  93. n_hash_map_ncah-
  94. <tt>stdext::hash_map</tt></li>
  95. <li>
  96. cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
  97. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  98. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  99. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  100. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  101. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  102. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  103. <li>
  104. cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
  105. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  106. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  107. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  108. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  109. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  110. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
  111. <li>
  112. cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
  113. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  114. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  115. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  116. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  117. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  118. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  119. <li>
  120. cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
  121. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  122. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  123. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  124. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  125. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  126. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
  127. </ol>
  128. </div><div style="width: 100%; height: 20px"></div></div>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. <div id="NCCL_res_div">
  134. <div id="NCCL_local">
  135. <div id="NCCL_cc_hash_random_int_subscript_timing_test_insert">
  136. <div id="NCCL_assoc">
  137. <div id="NCCL_Native_and_collision-chaining_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NCCL" id= "NCCL"><img src="cc_hash_random_int_subscript_timing_test_insert_local.png" alt="no image" /></a></h6>NCCL: Native and collision-chaining hash random int insert timing test using <tt><b>operator</b></tt> - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
  138. </div>
  139. </div>
  140. </div>
  141. </div>
  142. <div id="NGPG_res_div">
  143. <div id="NGPG_gcc">
  144. <div id="NGPG_gp_hash_random_int_subscript_timing_test_insert">
  145. <div id="NGPG_assoc">
  146. <div id="NGPG_Native_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPG" id="NGPG"><img src="gp_hash_random_int_subscript_timing_test_insert_gcc.png" alt="no image" /></a></h6>NGPG: Native and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
  147. <ol>
  148. <li>
  149. gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
  150. <a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
  151. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  152. , <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_prime_size_policy.html"><tt>hash_prime_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>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
  156. </li>
  157. <li>
  158. n_hash_map_ncah-
  159. <tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
  160. <li>
  161. gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
  162. <a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
  163. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  164. , <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  165. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  166. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  167. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
  168. </li>
  169. </ol>
  170. </div><div style="width: 100%; height: 20px"></div></div>
  171. </div>
  172. </div>
  173. </div>
  174. </div>
  175. <div id="NGPM_res_div">
  176. <div id="NGPM_msvc">
  177. <div id="NGPM_gp_hash_random_int_subscript_timing_test_insert">
  178. <div id="NGPM_assoc">
  179. <div id="NGPM_Native_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPM" id="NGPM"><img src="gp_hash_random_int_subscript_timing_test_insert_msvc.png" alt="no image" /></a></h6>NGPM: Native and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
  180. <ol>
  181. <li>
  182. n_hash_map_ncah-
  183. <tt>stdext::hash_map</tt></li>
  184. <li>
  185. gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
  186. <a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
  187. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  188. , <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  189. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  190. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  191. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
  192. </li>
  193. <li>
  194. gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
  195. <a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
  196. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  197. , <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  198. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  199. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  200. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
  201. </li>
  202. </ol>
  203. </div><div style="width: 100%; height: 20px"></div></div>
  204. </div>
  205. </div>
  206. </div>
  207. </div>
  208. <div id="NGPL_res_div">
  209. <div id="NGPL_local">
  210. <div id="NGPL_gp_hash_random_int_subscript_timing_test_insert">
  211. <div id="NGPL_assoc">
  212. <div id="NGPL_Native_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NGPL" id= "NGPL"><img src="gp_hash_random_int_subscript_timing_test_insert_local.png" alt="no image" /></a></h6>NGPL: Native and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. <div id="CCGPG_res_div">
  218. <div id="CCGPG_gcc">
  219. <div id="CCGPG_ccgp_hash_random_int_subscript_timing_test_insert">
  220. <div id="CCGPG_assoc">
  221. <div id="CCGPG_Collision-chaining_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="CCGPG" id="CCGPG"><img src="ccgp_hash_random_int_subscript_timing_test_insert_gcc.png" alt="no image" /></a></h6>CCGPG: Collision-chaining and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#gcc">g++</a><p>In the above figure, the names in the legends have the following meaning:</p>
  222. <ol>
  223. <li>
  224. gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
  225. <a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
  226. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  227. , <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  228. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  229. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  230. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
  231. </li>
  232. <li>
  233. cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
  234. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  235. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  236. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  237. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  238. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  239. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  240. <li>
  241. cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
  242. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  243. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  244. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  245. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  246. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  247. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  248. <li>
  249. gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
  250. <a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
  251. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  252. , <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  253. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  254. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  255. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
  256. </li>
  257. </ol>
  258. </div><div style="width: 100%; height: 20px"></div></div>
  259. </div>
  260. </div>
  261. </div>
  262. </div>
  263. <div id="CCGPM_res_div">
  264. <div id="CCGPM_msvc">
  265. <div id="CCGPM_ccgp_hash_random_int_subscript_timing_test_insert">
  266. <div id="CCGPM_assoc">
  267. <div id="CCGPM_Collision-chaining_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="CCGPM" id="CCGPM"><img src="ccgp_hash_random_int_subscript_timing_test_insert_msvc.png" alt="no image" /></a></h6>CCGPM: Collision-chaining and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href="assoc_performance_tests.html#msvc">msvc++</a><p>In the above figure, the names in the legends have the following meaning:</p>
  268. <ol>
  269. <li>
  270. cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
  271. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  272. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  273. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  274. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  275. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  276. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  277. <li>
  278. cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
  279. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  280. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  281. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  282. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  283. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  284. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  285. <li>
  286. gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
  287. <a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
  288. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  289. , <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  290. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  291. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  292. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="quadratic_probe_fn.html"><tt>quadratic_probe_fn</tt></a>
  293. </li>
  294. <li>
  295. gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
  296. <a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
  297. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  298. , <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  299. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  300. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  301. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i>, and <tt>Probe_Fn</tt> = <a href="linear_probe_fn.html"><tt>linear_probe_fn</tt></a>
  302. </li>
  303. </ol>
  304. </div><div style="width: 100%; height: 20px"></div></div>
  305. </div>
  306. </div>
  307. </div>
  308. </div>
  309. <div id="CCGPL_res_div">
  310. <div id="CCGPL_local">
  311. <div id="CCGPL_ccgp_hash_random_int_subscript_timing_test_insert">
  312. <div id="CCGPL_assoc">
  313. <div id="CCGPL_Collision-chaining_and_probing_hash_random_int_insert_timing_test_using__tt__b_operator_455b__455tt_"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="CCGPL" id= "CCGPL"><img src="ccgp_hash_random_int_subscript_timing_test_insert_local.png" alt="no image" /></a></h6>CCGPL: Collision-chaining and probing hash random int insert timing test using <tt><b>operator</b></tt> - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
  314. </div>
  315. </div>
  316. </div>
  317. </div>
  318. <h2><a name="observations" id="observations">Observations</a></h2>
  319. <p>In this setting, as in <a href="hash_text_find_find_timing_test.html">Hash-Based Text
  320. <tt>find</tt> Find Timing Test</a> and <a href="hash_random_int_find_find_timing_test.html">Hash-Based
  321. Random-Integer <tt>find</tt> Find Timing Test</a> , the choice
  322. of underlying hash-table underlying hash-table (see <a href="hash_based_containers.html">Design::Associative
  323. Containers::Hash-Based Containers</a> ) affects performance
  324. most, then the range-hashing scheme (See <a href="hash_based_containers.html#hash_policies">Design::Associative
  325. Containers::Hash-Based Containers::Hash Policies</a> ), and,
  326. only finally, other policies.</p>
  327. <p>There are some differences, however:</p>
  328. <ol>
  329. <li>In this setting, probing tables function sometimes more
  330. efficiently than collision-chaining tables (see Figures
  331. <a href="#CCGPG">CCGPG</a> and <a href="#CCGPM">CCGPM</a> ).
  332. This is explained shortly.</li>
  333. <li>The performance graphs have a "saw-tooth" shape. The
  334. average insert time rises and falls. As values are inserted
  335. into the container, the load factor grows larger. Eventually,
  336. a resize occurs. The reallocations and rehashing are
  337. relatively expensive. After this, the load factor is smaller
  338. than before.</li>
  339. </ol>
  340. <p>Collision-chaining containers use indirection for greater
  341. flexibility; probing containers store values contiguously, in
  342. an array (see Figure <a href="motivation.html#different_underlying_data_structures">Motivation::Different
  343. underlying data structures</a> A and B, respectively). It
  344. follows that for simple data types, probing containers access
  345. their allocator less frequently than collision-chaining
  346. containers, (although they still have less efficient probing
  347. sequences). This explains why some probing containers fare
  348. better than collision-chaining containers in this case.</p>
  349. <p>Within each type of hash-table, the range-hashing scheme
  350. affects performance more than other policies. This is similar
  351. to the situation in <a href="hash_text_find_find_timing_test.html">Hash-Based Text
  352. <tt>find</tt> Find Timing Test</a> and <a href="hash_random_int_find_find_timing_test.html">Hash-Based
  353. Random-Integer <tt>find</tt> Find Timing Test</a>.
  354. Unsurprisingly, however, containers with <u>lower</u>
  355. <i>alpha<sub>max</sub></i> perform <u>worse</u> in this case,
  356. since more re-hashes are performed.</p>
  357. <p><a href="assoc_performance_tests.html#hash_based_types">Observations::Hash-Based
  358. Container Types</a> summarizes some observations on hash-based
  359. containers; <a href="assoc_performance_tests.html#hash_based_policies">Observations::Hash-Based
  360. Containers' Policies</a> summarizes some observations on
  361. hash-based containers' policies.</p>
  362. </div>
  363. </body>
  364. </html>