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

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

https://bitbucket.org/pizzafactory/pf-gcc
HTML | 220 lines | 219 code | 1 blank | 0 comment | 0 complexity | a19225de2acc3254129f98030cb1aa7e 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 Find 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>
  12. FindTiming 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, then performs a series of finds
  16. using <tt><b>operator</b>[]</tt>. It measures the average time
  17. for <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_find_timing.cc"><tt>hash_random_int_subscript_find_timing_test</tt></a>
  20. 200 200 2100)</p>
  21. <h2><a name="purpose" id="purpose">Purpose</a></h2>
  22. <p>The test checks the effect of different underlying
  23. hash-tables (see <a href="hash_based_containers.html">Design::Hash-Based Containers</a>
  24. ), range-hashing functions, and trigger policies (see <a href="hash_based_containers.html#hash_policies">Design::Hash-Based
  25. Containers::Hash Policies</a> and <a href="hash_based_containers.html#resize_policies">Design::Hash-Based
  26. Containers::Resize Policies</a> ).</p>
  27. <h2><a name="results" id="results">Results</a></h2>
  28. <p>Figures <a href="#NCCG">NCCG</a>, <a href="#NCCM">NCCM</a>,
  29. and <a href="#NCCL">NCCL</a> show the results for the native
  30. 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
  31. <a href="assoc_performance_tests.html#local"><u>local</u></a>,
  32. respectively; Figures <a href="#NGPG">NGPG</a>, <a href="#NGPM">NGPM</a>, and <a href="#NGPL">NGPL</a> show the results
  33. 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
  34. <a href="assoc_performance_tests.html#local"><u>local</u></a>,
  35. respectively.</p>
  36. <div id="NCCG_res_div">
  37. <div id="NCCG_gcc">
  38. <div id="NCCG_cc_hash_random_int_subscript_timing_test_find">
  39. <div id="NCCG_assoc">
  40. <div id="NCCG_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><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_find_gcc.png" alt="no image" /></a></h6>NCCG: Native and collision-chaining hash random int find 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>
  41. <ol>
  42. <li>
  43. n_hash_map_ncah-
  44. <tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
  45. <li>
  46. cc_hash_mod_prime_nea_lc_1div8_1div1_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/1</i></li>
  53. <li>
  54. cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
  55. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  56. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_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_prime_size_policy.html"><tt>hash_prime_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. cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
  63. <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/1</i></li>
  69. <li>
  70. cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
  71. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  72. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  73. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  74. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  75. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  76. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  77. </ol>
  78. </div><div style="width: 100%; height: 20px"></div></div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. <div id="NCCM_res_div">
  84. <div id="NCCM_msvc">
  85. <div id="NCCM_cc_hash_random_int_subscript_timing_test_find">
  86. <div id="NCCM_assoc">
  87. <div id="NCCM_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><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_find_msvc.png" alt="no image" /></a></h6>NCCM: Native and collision-chaining hash random int find 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>
  88. <ol>
  89. <li>
  90. cc_hash_mod_prime_nea_lc_1div8_1div1_nsth_map-
  91. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  92. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  93. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  94. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  95. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  96. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
  97. <li>
  98. cc_hash_mod_prime_nea_lc_1div8_1div2_nsth_map-
  99. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  100. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  101. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  102. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  103. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  104. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  105. <li>
  106. n_hash_map_ncah-
  107. <tt>stdext::hash_map</tt></li>
  108. <li>
  109. cc_hash_mask_exp_nea_lc_1div8_1div1_nsth_map-
  110. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  111. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  112. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  113. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  114. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  115. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/1</i></li>
  116. <li>
  117. cc_hash_mask_exp_nea_lc_1div8_1div2_nsth_map-
  118. <a href="cc_hash_table.html"><tt>cc_hash_table</tt></a>
  119. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  120. , and <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  121. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  122. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  123. with <i>&alpha;<sub>min</sub></i> = <i>1/8</i> and <i>&alpha;<sub>max</sub></i> = <i>1/2</i></li>
  124. </ol>
  125. </div><div style="width: 100%; height: 20px"></div></div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. <div id="NCCL_res_div">
  131. <div id="NCCL_local">
  132. <div id="NCCL_cc_hash_random_int_subscript_timing_test_find">
  133. <div id="NCCL_assoc">
  134. <div id="NCCL_Native_and_collision-chaining_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><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_find_local.png" alt="no image" /></a></h6>NCCL: Native and collision-chaining hash random int find 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>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <div id="NGPG_res_div">
  140. <div id="NGPG_gcc">
  141. <div id="NGPG_gp_hash_random_int_subscript_timing_test_find">
  142. <div id="NGPG_assoc">
  143. <div id="NGPG_Native_and_probing_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><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_find_gcc.png" alt="no image" /></a></h6>NGPG: Native and probing hash random int find 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>
  144. <ol>
  145. <li>
  146. n_hash_map_ncah-
  147. <tt>std::tr1::unordered_map</tt> with <tt>cache_hash_code</tt> = <tt><b>false</b></tt></li>
  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. gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
  159. <a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
  160. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  161. , <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  162. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  163. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  164. 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>
  165. </li>
  166. </ol>
  167. </div><div style="width: 100%; height: 20px"></div></div>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. <div id="NGPM_res_div">
  173. <div id="NGPM_msvc">
  174. <div id="NGPM_gp_hash_random_int_subscript_timing_test_find">
  175. <div id="NGPM_assoc">
  176. <div id="NGPM_Native_and_probing_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><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_find_msvc.png" alt="no image" /></a></h6>NGPM: Native and probing hash random int find 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>
  177. <ol>
  178. <li>
  179. gp_hash_mod_quadp_prime_nea_lc_1div8_1div2_nsth_map-
  180. <a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
  181. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mod_range_hashing.html"><tt>direct_mod_range_hashing</tt></a>
  182. , <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  183. with <tt>Size_Policy</tt> = <a href="hash_prime_size_policy.html"><tt>hash_prime_size_policy</tt></a>
  184. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  185. 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>
  186. </li>
  187. <li>
  188. n_hash_map_ncah-
  189. <tt>stdext::hash_map</tt></li>
  190. <li>
  191. gp_hash_mask_linp_exp_nea_lc_1div8_1div2_nsth_map-
  192. <a href="gp_hash_table.html"><tt>gp_hash_table</tt></a>
  193. with <tt>Comb_Hash_Fn</tt> = <a href="direct_mask_range_hashing.html"><tt>direct_mask_range_hashing</tt></a>
  194. , <tt>Resize_Policy</tt> = <a href="hash_standard_resize_policy.html"><tt>hash_standard_resize_policy</tt></a>
  195. with <tt>Size_Policy</tt> = <a href="hash_exponential_size_policy.html"><tt>hash_exponential_size_policy</tt></a>
  196. , and <tt>Trigger_Policy</tt> = <a href="hash_load_check_resize_trigger.html"><tt>hash_load_check_resize_trigger</tt></a>
  197. 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>
  198. </li>
  199. </ol>
  200. </div><div style="width: 100%; height: 20px"></div></div>
  201. </div>
  202. </div>
  203. </div>
  204. </div>
  205. <div id="NGPL_res_div">
  206. <div id="NGPL_local">
  207. <div id="NGPL_gp_hash_random_int_subscript_timing_test_find">
  208. <div id="NGPL_assoc">
  209. <div id="NGPL_Native_and_probing_hash_random_int_find_timing_test_using__tt__b_operator_455b__455tt__457"><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_find_local.png" alt="no image" /></a></h6>NGPL: Native and probing hash random int find 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>
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. <h2><a name="observations" id="observations">Observations</a></h2>
  215. <p>This test shows similar results to <a href="hash_random_int_find_find_timing_test.html">Hash-Based
  216. Random-Integer <tt>find</tt> Find Timing Test</a> .</p>
  217. </div>
  218. </body>
  219. </html>