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

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

https://bitbucket.org/pizzafactory/pf-gcc
HTML | 126 lines | 125 code | 1 blank | 0 comment | 0 complexity | 4577714d81f67f75cff79de36581e4ce 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>Tree Text Locality of Reference 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>Tree-Based Locality-of-Reference Text <tt>find</tt> Find
  12. Timing Test</h1>
  13. <h2><a name="description" id="description">Description</a></h2>
  14. <p>This test inserts a number of values with keys from an
  15. arbitrary text ([ <a href="references.html#wickland96thirty">wickland96thirty</a> ]) into
  16. a container, then performs a series of finds using
  17. <tt>find</tt> . It is different than <a href="tree_text_find_find_timing_test.html">Tree-Based and
  18. Trie-Based Text <tt>find</tt> Find Timing Test</a> in the
  19. sequence of finds it performs: this test performs multiple
  20. <tt>find</tt> s on the same key before moving on to the next
  21. key. It measures the average time for <tt>find</tt> as a
  22. function of the number of values inserted.</p>
  23. <p>(The test was executed with <a href="http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/testsuite/performance/ext/pb_ds/tree_text_lor_find_timing.cc"><tt>tree_text_lor_find_timing_test</tt></a>
  24. thirty_years_among_the_dead_preproc.txt 200 200 2100)</p>
  25. <h2><a name="purpose" id="purpose">Purpose</a></h2>
  26. <p>The test checks the effect of different underlying
  27. data structures in a locality-of-reference setting.</p>
  28. <h2><a name="results" id="results">Results</a></h2>
  29. <p>Figures <a href="#NTG">NTG</a>, <a href="#NTM">NTM</a>, and
  30. <a href="#NTL">NTL</a> show the results for the native and
  31. <tt>pb_ds</tt> tree-based 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
  32. <a href="assoc_performance_tests.html#local"><u>local</u></a>,
  33. respectively.</p>
  34. <div id="NTG_res_div">
  35. <div id="NTG_gcc">
  36. <div id="NTG_tree_text_lor_find_timing_test">
  37. <div id="NTG_assoc">
  38. <div id="NTG_Native_and_tree-based_locality-of-reference_text_find_timing_test_using__tt_find_455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTG" id="NTG"><img src="tree_text_lor_find_timing_test_gcc.png" alt="no image" /></a></h6>NTG: Native and tree-based locality-of-reference text find timing test using <tt>find</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>
  39. <ol>
  40. <li>
  41. ov_tree_map-
  42. <a href="tree.html"><tt>tree</tt></a>
  43. with <tt>Tag</tt> = <a href="ov_tree_tag.html"><tt>ov_tree_tag</tt></a>
  44. , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
  45. </li>
  46. <li>
  47. rb_tree_map-
  48. <a href="tree.html"><tt>tree</tt></a>
  49. with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
  50. , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
  51. </li>
  52. <li>
  53. n_map-
  54. <tt>std::map</tt></li>
  55. <li>
  56. splay_tree_map-
  57. <a href="tree.html"><tt>tree</tt></a>
  58. with <tt>Tag</tt> = <a href="splay_tree_tag.html"><tt>splay_tree_tag</tt></a>
  59. , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
  60. </li>
  61. </ol>
  62. </div><div style="width: 100%; height: 20px"></div></div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <div id="NTM_res_div">
  68. <div id="NTM_msvc">
  69. <div id="NTM_tree_text_lor_find_timing_test">
  70. <div id="NTM_assoc">
  71. <div id="NTM_Native_and_tree-based_locality-of-reference_text_find_timing_test_using__tt_find_455tt_"><div style="border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTM" id="NTM"><img src="tree_text_lor_find_timing_test_msvc.png" alt="no image" /></a></h6>NTM: Native and tree-based locality-of-reference text find timing test using <tt>find</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>
  72. <ol>
  73. <li>
  74. ov_tree_map-
  75. <a href="tree.html"><tt>tree</tt></a>
  76. with <tt>Tag</tt> = <a href="ov_tree_tag.html"><tt>ov_tree_tag</tt></a>
  77. , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
  78. </li>
  79. <li>
  80. rb_tree_map-
  81. <a href="tree.html"><tt>tree</tt></a>
  82. with <tt>Tag</tt> = <a href="rb_tree_tag.html"><tt>rb_tree_tag</tt></a>
  83. , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
  84. </li>
  85. <li>
  86. n_map-
  87. <tt>std::map</tt></li>
  88. <li>
  89. splay_tree_map-
  90. <a href="tree.html"><tt>tree</tt></a>
  91. with <tt>Tag</tt> = <a href="splay_tree_tag.html"><tt>splay_tree_tag</tt></a>
  92. , and <tt>Node_Update</tt> = <a href="null_tree_node_update.html"><tt>null_tree_node_update</tt></a>
  93. </li>
  94. </ol>
  95. </div><div style="width: 100%; height: 20px"></div></div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <div id="NTL_res_div">
  101. <div id="NTL_local">
  102. <div id="NTL_tree_text_lor_find_timing_test">
  103. <div id="NTL_assoc">
  104. <div id="NTL_Native_and_tree-based_locality-of-reference_text_find_timing_test_using__tt_find_455tt_"><div style = "border-style: dotted; border-width: 1px; border-color: lightgray"><h6 class="c1"><a name="NTL" id= "NTL"><img src="tree_text_lor_find_timing_test_local.png" alt="no image" /></a></h6>NTL: Native and tree-based locality-of-reference text find timing test using <tt>find</tt> - <a href = "assoc_performance_tests.html#local">local</a></div><div style = "width: 100%; height: 20px"></div></div>
  105. </div>
  106. </div>
  107. </div>
  108. </div>
  109. <h2><a name="observations" id="observations">Observations</a></h2>
  110. <p>For this setting, an ordered-vector tree ( <a href="tree.html"><tt>tree</tt></a>
  111. with <tt>Tag =</tt> <a href="ov_tree_tag.html"><tt>ov_tree_tag</tt></a> ), a
  112. red-black tree ( <a href="tree.html"><tt>tree</tt></a>
  113. with <tt>Tag =</tt> <a href="splay_tree_tag.html"><tt>rb_tree_tag</tt></a> ), and the
  114. native red-black tree all share approximately the same
  115. performance.</p>
  116. <p>A splay tree ( <a href="tree.html"><tt>tree</tt></a>
  117. with <tt>Tag =</tt> <a href="splay_tree_tag.html"><tt>splay_tree_tag</tt></a> ) does
  118. much better, since each (successful) find "bubbles" the
  119. corresponding node to the root of the tree.</p>
  120. <p><a href="assoc_performance_tests.html#tree_like_based_types">Observations::Tree-Like-Based
  121. Container Types</a> summarizes some observations on tree-based
  122. and trie-based containers.</p>
  123. </div>
  124. </body>
  125. </html>