<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Very interesting, thank you. in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-parallel-merging/m-p/994149#M6336</link>
    <description>Very interesting, thank you.</description>
    <pubDate>Tue, 25 Dec 2012 08:38:47 GMT</pubDate>
    <dc:creator>Andrey_Tikhonov</dc:creator>
    <dc:date>2012-12-25T08:38:47Z</dc:date>
    <item>
      <title>About parallel merging ...</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-parallel-merging/m-p/994148#M6335</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I have just read the following paper on Parallel 
Merging:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.economyinformatics.ase.ro/content/EN4/alecu.pdf" target="_blank"&gt;http://www.economyinformatics.ase.ro/content/EN4/alecu.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And 
i have implemented this algorithm just to see what is the 
performance.&lt;BR /&gt;&lt;BR /&gt;And i have noticed that the serial algorithm is 8 times 
slower&lt;BR /&gt;than the merge function that you find in the serial mergesort 
algorithm.&lt;BR /&gt;So 8 times slower, it's too slow.&lt;BR /&gt;&lt;BR /&gt;It's better to use the 
following 
algorithm;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.drdobbs.com/parallel/parallel-merge/229204454?queryText=parallel%2Bsort" target="_blank"&gt;http://www.drdobbs.com/parallel/parallel-merge/229204454?queryText=parallel%2Bsort&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The 
idea is simple:&lt;BR /&gt;&lt;BR /&gt;Let's assume we want to merge sorted arrays X and Y. 
Select X&lt;M&gt; median&lt;BR /&gt;element in X. Elements in X[ .. m-1] are less than or 
equal to X&lt;M&gt;.&lt;BR /&gt;Using binary search find index k of the first element in Y 
greater than &lt;BR /&gt;X&lt;M&gt;. &lt;BR /&gt;Thus Y[ .. k-1] are less than or equal to X&lt;M&gt; as 
well. Elements in X[m+1 .. ]&lt;BR /&gt;are greater than or equal to X&lt;M&gt; and Y[k .. ] 
are greater. So merge(X, Y)&lt;BR /&gt;can be defined as concat(merge(X[ .. m-1], Y[ .. 
k-1]), X&lt;M&gt;, merge(X[m+1 .. ], Y[k .. ]))&lt;BR /&gt;now we can recursively in parallel 
do merge(X[ .. m-1], Y[ .. k-1]) and&lt;BR /&gt;merge(X[m+1 .. ], Y[k .. ]) and then 
concat results.&lt;BR /&gt;&lt;BR /&gt;And then you can continue to apply this method 
recursivily.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;BR /&gt;Amine Moulay Ramdane.&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/M&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Aug 2012 18:49:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-parallel-merging/m-p/994148#M6335</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2012-08-26T18:49:22Z</dc:date>
    </item>
    <item>
      <title>Very interesting, thank you.</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-parallel-merging/m-p/994149#M6336</link>
      <description>Very interesting, thank you.</description>
      <pubDate>Tue, 25 Dec 2012 08:38:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-parallel-merging/m-p/994149#M6336</guid>
      <dc:creator>Andrey_Tikhonov</dc:creator>
      <dc:date>2012-12-25T08:38:47Z</dc:date>
    </item>
    <item>
      <title>Thanks for these web-links.</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-parallel-merging/m-p/994150#M6337</link>
      <description>Thanks for these web-links.

&amp;gt;&amp;gt;...And i have noticed that the serial algorithm is 8 times slower
&amp;gt;&amp;gt;than the merge function that you find in the serial mergesort algorithm.
&amp;gt;&amp;gt;So 8 times slower, it's too slow.

I'm not surprised with your results because &lt;STRONG&gt;MergeSort&lt;/STRONG&gt; is easily parallelizable by design: it splitts a source ( input ) data set in half on every recursion call until it reaches a threshold value two or four.

Note: A threshold value depends if a data-mining step ( pair-switching ) was performed before processing.

&amp;gt;&amp;gt;...Using &lt;STRONG&gt;binary search&lt;/STRONG&gt; find index k of the first element in Y greater than X&lt;M&gt;...

It is clear that application of a &lt;STRONG&gt;binary search&lt;/STRONG&gt; inside of &lt;STRONG&gt;MergeSort&lt;/STRONG&gt; will create additional overhead and possibly affect a performance.&lt;/M&gt;</description>
      <pubDate>Sun, 13 Jan 2013 22:45:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-parallel-merging/m-p/994150#M6337</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-01-13T22:45:26Z</dc:date>
    </item>
  </channel>
</rss>

