<?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 GMP  Performance of multiplication vs squaring? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/GMP-Performance-of-multiplication-vs-squaring/m-p/802627#M3187</link>
    <description>Franz,&lt;BR /&gt;&lt;BR /&gt;Thank you for your interest in our library and particularly in its multi-precision functionality.&lt;BR /&gt;&lt;BR /&gt;In one of our future versions there will be a significant speed-up of multiplication, including the squaring case.&lt;BR /&gt;&lt;BR /&gt;We do not encourage using any undocumented "hidden features" of MKL. If you feel that some feature is missing, please do not hesitate to submit a feature request through premier.intel.com.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Vladimir</description>
    <pubDate>Wed, 09 Jun 2010 16:46:43 GMT</pubDate>
    <dc:creator>Vladimir_Petrov__Int</dc:creator>
    <dc:date>2010-06-09T16:46:43Z</dc:date>
    <item>
      <title>GMP  Performance of multiplication vs squaring?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/GMP-Performance-of-multiplication-vs-squaring/m-p/802625#M3185</link>
      <description>I did some performance tests with multiplication.&lt;BR /&gt;There is no dedicated operation for squaring, and multiplication does not seem to detect squaring situations (identical operands for multiplication)&lt;BR /&gt;&lt;BR /&gt;It should be expected that a dedicated implementation of squaring provides a significant performance benefit.&lt;BR /&gt;(at least this is my experience with own implementations of grammar school multiplication, Karatsuba, FFT). &lt;BR /&gt;&lt;BR /&gt;Questions:&lt;BR /&gt;- is there a hidden feature in MKL/GMP for optimized squaring?&lt;BR /&gt;- are there plans for future versions of MKL to improve squaring?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Jun 2010 08:53:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/GMP-Performance-of-multiplication-vs-squaring/m-p/802625#M3185</guid>
      <dc:creator>fritzfranz</dc:creator>
      <dc:date>2010-06-09T08:53:37Z</dc:date>
    </item>
    <item>
      <title>GMP  Performance of multiplication vs squaring?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/GMP-Performance-of-multiplication-vs-squaring/m-p/802626#M3186</link>
      <description>Sorry, Vladimir is correct -- I misunderstood the question and, therefore, my posting should be removed. &lt;BR /&gt;&lt;BR /&gt;I do not know how to erase a posting, so I edited the posting, removed the irrelevant content and substituted this retraction.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 09 Jun 2010 12:21:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/GMP-Performance-of-multiplication-vs-squaring/m-p/802626#M3186</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2010-06-09T12:21:36Z</dc:date>
    </item>
    <item>
      <title>GMP  Performance of multiplication vs squaring?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/GMP-Performance-of-multiplication-vs-squaring/m-p/802627#M3187</link>
      <description>Franz,&lt;BR /&gt;&lt;BR /&gt;Thank you for your interest in our library and particularly in its multi-precision functionality.&lt;BR /&gt;&lt;BR /&gt;In one of our future versions there will be a significant speed-up of multiplication, including the squaring case.&lt;BR /&gt;&lt;BR /&gt;We do not encourage using any undocumented "hidden features" of MKL. If you feel that some feature is missing, please do not hesitate to submit a feature request through premier.intel.com.&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Vladimir</description>
      <pubDate>Wed, 09 Jun 2010 16:46:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/GMP-Performance-of-multiplication-vs-squaring/m-p/802627#M3187</guid>
      <dc:creator>Vladimir_Petrov__Int</dc:creator>
      <dc:date>2010-06-09T16:46:43Z</dc:date>
    </item>
    <item>
      <title>GMP  Performance of multiplication vs squaring?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/GMP-Performance-of-multiplication-vs-squaring/m-p/802628#M3188</link>
      <description>&lt;DIV id="tiny_quote"&gt;
                &lt;DIV style="margin-left: 2px; margin-right: 2px;"&gt;Quoting &lt;A rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=9662" class="basic" href="https://community.intel.com/en-us/profile/9662/"&gt;mecej4&lt;/A&gt;&lt;/DIV&gt;
                &lt;DIV style="background-color: #e5e5e5; padding: 5px; border: 1px inset; margin-left: 2px; margin-right: 2px;"&gt;&lt;I&gt;Please give some examples. Here is a counterexample (with default precision -- did you mean to exclude this case?) :&lt;BR /&gt;&lt;BR /&gt;&lt;DIV class="dp-highlighter"&gt;&lt;DIV class="bar"&gt;&lt;DIV class="tools"&gt;&lt;A href="#" onclick="dp.sh.Toolbar.Command('CollapseSource',this);return false;"&gt;- collapse source&lt;/A&gt;&lt;A href="#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/A&gt;&lt;A href="#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/A&gt;&lt;A href="#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/A&gt;&lt;A href="#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/A&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;OL start="1"&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;&lt;SPAN class="keyword bold"&gt;subroutine&lt;/SPAN&gt;&lt;SPAN&gt;sub(x,y)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN class="keyword bold"&gt;real&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class="keyword bold"&gt;intent&lt;/SPAN&gt;&lt;SPAN&gt;(in)::x&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;&lt;SPAN class="keyword bold"&gt;real&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN class="keyword bold"&gt;intent&lt;/SPAN&gt;&lt;SPAN&gt;(out)::y&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;y=x*x&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;&lt;SPAN class="keyword bold"&gt;return&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN class="keyword bold"&gt;end&lt;/SPAN&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="keyword bold"&gt;subroutine&lt;/SPAN&gt;&lt;SPAN&gt;sub&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;/I&gt;&lt;PRE&gt;&lt;I&gt;[fortran]subroutine sub(x,y)&lt;BR /&gt;real, intent(in) :: x&lt;BR /&gt;real, intent(out) :: y&lt;BR /&gt;y=x*x&lt;BR /&gt;return&lt;BR /&gt;end subroutine sub[/fortran]&lt;/I&gt;&lt;/PRE&gt; compiles to&lt;BR /&gt;&lt;BR /&gt;&lt;DIV class="dp-highlighter"&gt;&lt;DIV class="bar"&gt;&lt;DIV class="tools"&gt;&lt;A href="#" onclick="dp.sh.Toolbar.Command('CollapseSource',this);return false;"&gt;- collapse source&lt;/A&gt;&lt;A href="#" onclick="dp.sh.Toolbar.Command('ViewSource',this);return false;"&gt;view plain&lt;/A&gt;&lt;A href="#" onclick="dp.sh.Toolbar.Command('CopyToClipboard',this);return false;"&gt;copy to clipboard&lt;/A&gt;&lt;A href="#" onclick="dp.sh.Toolbar.Command('PrintSource',this);return false;"&gt;print&lt;/A&gt;&lt;A href="#" onclick="dp.sh.Toolbar.Command('About',this);return false;"&gt;?&lt;/A&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;OL class="dp-sh" start="1"&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;&lt;SPAN&gt;moveax,DWORDPTR[4+esp]&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;movedx,DWORDPTR[8+esp]&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;movssxmm0,DWORDPTR[eax]&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;mulssxmm0,xmm0&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI class="alt"&gt;&lt;SPAN&gt;movssDWORDPTR[edx],xmm0&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;ret&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;PRE&gt;[bash]    mov       eax, DWORD PTR [4+esp]&lt;BR /&gt;    mov       edx, DWORD PTR [8+esp]&lt;BR /&gt;    movss     xmm0, DWORD PTR [eax]&lt;BR /&gt;    mulss     xmm0, xmm0&lt;BR /&gt;    movss     DWORD PTR [edx], xmm0&lt;BR /&gt;    ret[/bash]&lt;/PRE&gt; and, to me, it seems clear that 'mulss xmm0,xmm0' captures the essence of 'square the operand'.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;This "counterexample" is not quite relevant to the subject of this thread since the original question was about multi-precision integer arithmetic.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Vladimir&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2010 04:59:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/GMP-Performance-of-multiplication-vs-squaring/m-p/802628#M3188</guid>
      <dc:creator>Vladimir_Petrov__Int</dc:creator>
      <dc:date>2010-06-10T04:59:10Z</dc:date>
    </item>
  </channel>
</rss>

