<?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 Re: Using eval IPP library, performance is slower than C code in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-eval-IPP-library-performance-is-slower-than-C-code/m-p/912027#M14358</link>
    <description>It seems you want to compute the L2 norm of x-mu (or the square of the norm?).&lt;BR /&gt;You can try some more suitable IPP function like &lt;BR /&gt;ippiNormDiff_L2_32f_C1R &lt;BR /&gt;or maybe use dot product with ippsDotProd_32f. &lt;BR /&gt;</description>
    <pubDate>Thu, 06 Sep 2007 12:26:05 GMT</pubDate>
    <dc:creator>nizanh</dc:creator>
    <dc:date>2007-09-06T12:26:05Z</dc:date>
    <item>
      <title>Using eval IPP library, performance is slower than C code</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-eval-IPP-library-performance-is-slower-than-C-code/m-p/912026#M14357</link>
      <description>&lt;FONT size="3"&gt;In order to evaluate IPP as a solution for a particular problem, I've implemented an algorithm in both straight C code and using IPP signal processing algorithms. When benchmarking the code, I find the C code runs almost twice as fast as the IPP code. Because this is an eval version, all the IPP libraries are dynamic. I'm running on a dual Xeon, 3 GHz processor using RedHat4 Linux.&lt;BR /&gt;&lt;BR /&gt;Here is a code fragment of the primary algorithm:&lt;BR /&gt;&lt;FONT face="Courier New" size="1"&gt;&lt;BR /&gt;#if defined(IPP)&lt;BR /&gt;  // ^tmpbuff = ^x - ^mu for vec_dim elements&lt;BR /&gt;  ippsSub_32f(mu, x, tmpbuff, vec_dim);&lt;BR /&gt;  // ^tmpbuff = ^tmpbuff * ^tmpbuff for vec_dim elements&lt;BR /&gt;  ippsMul_32f_I(tmpbuff, tmpbuff, vec_dim);&lt;BR /&gt;  // ^tmpbuff = ^tmpbuff * ^ivar for vec_dim elements&lt;BR /&gt;  ippsMul_32f_I(ivar, tmpbuff, vec_dim);&lt;BR /&gt;  // sum = SUM(^tmpbuff) over vec_dim elements&lt;BR /&gt;  ippsSum_32f(tmpbuff, vec_dim, ∑, ippAlgHintFast);&lt;BR /&gt;  *s_ptr += sum;&lt;BR /&gt;&lt;BR /&gt;  mu += vec_dim;&lt;BR /&gt;  ivar += vec_dim;&lt;BR /&gt;#else&lt;BR /&gt;  for (j = vec_dim-1; j &amp;gt;= (BLOCK_train-1);j-=BLOCK_train) /* groups of BLOCK_train */&lt;BR /&gt;  {&lt;BR /&gt;   tmp = (*x++ - *mu++); *s_ptr += tmp*tmp*(*ivar++);&lt;BR /&gt;   tmp = (*x++ - *mu++); *s_ptr += tmp*tmp*(*ivar++);&lt;BR /&gt;   tmp = (*x++ - *mu++); *s_ptr += tmp*tmp*(*ivar++);&lt;BR /&gt;   tmp = (*x++ - *mu++); *s_ptr += tmp*tmp*(*ivar++);&lt;BR /&gt;   tmp = (*x++ - *mu++); *s_ptr += tmp*tmp*(*ivar++);&lt;BR /&gt;   tmp = (*x++ - *mu++); *s_ptr += tmp*tmp*(*ivar++);&lt;BR /&gt;   tmp = (*x++ - *mu++); *s_ptr += tmp*tmp*(*ivar++);&lt;BR /&gt;     }&lt;BR /&gt;#endif&lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;All the buffers were allocated with ippMalloc so they'd have the correct alignment. The dimension of each row is 49 elements but I've padded them to 56 elements when invoking IPP by adding zeros to the end of each row vector thinking I needed to have a multiple of 32-bytes (or 8 floats) in a row.&lt;BR /&gt;&lt;BR /&gt;I used oprofile to try and determine where the time is being spent and I found that there is a substantial amount of time being spent in functions named own_XXX_32f where XXX is Sub or Sum, or Mul. In fact, far more time is spent in these than is spent in the actual functions doing the work.&lt;BR /&gt;&lt;BR /&gt;When I run a certain number of iterations over the C code version, it takes about 3.2 seconds. Running IPP version takes almost 5 seconds.&lt;BR /&gt;&lt;BR /&gt;Any ideas as to what might be going on here?&lt;BR /&gt;&lt;/FONT&gt;</description>
      <pubDate>Fri, 24 Aug 2007 16:03:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-eval-IPP-library-performance-is-slower-than-C-code/m-p/912026#M14357</guid>
      <dc:creator>sizzzzlerz</dc:creator>
      <dc:date>2007-08-24T16:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using eval IPP library, performance is slower than C code</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-eval-IPP-library-performance-is-slower-than-C-code/m-p/912027#M14358</link>
      <description>It seems you want to compute the L2 norm of x-mu (or the square of the norm?).&lt;BR /&gt;You can try some more suitable IPP function like &lt;BR /&gt;ippiNormDiff_L2_32f_C1R &lt;BR /&gt;or maybe use dot product with ippsDotProd_32f. &lt;BR /&gt;</description>
      <pubDate>Thu, 06 Sep 2007 12:26:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-eval-IPP-library-performance-is-slower-than-C-code/m-p/912027#M14358</guid>
      <dc:creator>nizanh</dc:creator>
      <dc:date>2007-09-06T12:26:05Z</dc:date>
    </item>
  </channel>
</rss>

