<?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: cross-typed usage penalties in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/cross-typed-usage-penalties/m-p/855091#M7217</link>
    <description>&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;Our engineering contacts responded:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir="ltr" style="MARGIN-RIGHT: 0px"&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 13.5pt; COLOR: blue; FONT-FAMILY: Arial"&gt;&lt;FONT color="#000000" size="2"&gt;Cross-type (mostly) means mixing vector integer and vector floating point. Mixing packed single and packed double is ok. One can write a code sequence to measure this for specific examples. When you violate the rules, the penalty will depend on which micro-architecture you are using. It may increase in future machines. It is at least 1 clock on Intel Core2 Duo Processors, and in some cases you can pay this more than once.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;==&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;Lexi S.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;IntelSoftware NetworkSupport&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.intel.com/software"&gt;&lt;FONT color="#800080"&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;A href="http://www.intel.com/software" target="_blank"&gt;http://www.intel.com/software&lt;/A&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.intel.com/cd/ids/developer/asmo-na/eng/58987.htm"&gt;&lt;FONT color="#800080"&gt;Contact us&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jun 2007 22:21:32 GMT</pubDate>
    <dc:creator>Intel_Software_Netw1</dc:creator>
    <dc:date>2007-06-12T22:21:32Z</dc:date>
    <item>
      <title>cross-typed usage penalties</title>
      <link>https://community.intel.com/t5/Software-Archive/cross-typed-usage-penalties/m-p/855090#M7216</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Intel 64 and IA-32 Architectures Optimization Reference Manual states ( see 5.1)&lt;BR /&gt;that&lt;BR /&gt;&lt;BR /&gt;"Code sequences containing cross-typed usage produce the same result across&lt;BR /&gt;different implementations but incur a &lt;U&gt;significant performance penalty&lt;/U&gt;. Using&lt;BR /&gt;SSE/SSE2/SSE3/SSSE3 instructions to operate on type-mismatched SIMD data&lt;BR /&gt;in the XMM register is strongly discouraged". ( underline is mine ).&lt;BR /&gt;&lt;BR /&gt;Is there exact data of the performance penalties?&lt;BR /&gt;&lt;BR /&gt;Specifically, what would be the penalty of mixing &lt;B&gt;movhlps&lt;/B&gt; ( single precision type ) with &lt;B&gt;addsd&lt;/B&gt; ( double precision type ) e.g.&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;B&gt;movhlp %xmm1,%xmm2&lt;BR /&gt;addsd %xmm2,%xmm3&lt;/B&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;How much more efficient would be to use the following instead&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;B&gt;unpckhpd %xmm1,%xmm1&lt;BR /&gt;addsd %xmm1,%xmm3&lt;/B&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;or&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;B&gt;shufpd $1,%xmm1,%xmm1&lt;BR /&gt;addsd %xmm1,%xmm3&lt;/B&gt;&lt;/BLOCKQUOTE&gt;Thank you,&lt;BR /&gt;&lt;BR /&gt;David Livshin&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;&lt;A href="http://www.dalsoft.com"&gt;http://www.dalsoft.com&lt;/A&gt;&lt;/P&gt;
&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Jun 2007 13:39:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/cross-typed-usage-penalties/m-p/855090#M7216</guid>
      <dc:creator>david_livshin1</dc:creator>
      <dc:date>2007-06-12T13:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: cross-typed usage penalties</title>
      <link>https://community.intel.com/t5/Software-Archive/cross-typed-usage-penalties/m-p/855091#M7217</link>
      <description>&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;Our engineering contacts responded:&lt;/FONT&gt;&lt;/P&gt;
&lt;BLOCKQUOTE dir="ltr" style="MARGIN-RIGHT: 0px"&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 13.5pt; COLOR: blue; FONT-FAMILY: Arial"&gt;&lt;FONT color="#000000" size="2"&gt;Cross-type (mostly) means mixing vector integer and vector floating point. Mixing packed single and packed double is ok. One can write a code sequence to measure this for specific examples. When you violate the rules, the penalty will depend on which micro-architecture you are using. It may increase in future machines. It is at least 1 clock on Intel Core2 Duo Processors, and in some cases you can pay this more than once.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;==&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;Lexi S.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;IntelSoftware NetworkSupport&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.intel.com/software"&gt;&lt;FONT color="#800080"&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;A href="http://www.intel.com/software" target="_blank"&gt;http://www.intel.com/software&lt;/A&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;A href="http://www.intel.com/cd/ids/developer/asmo-na/eng/58987.htm"&gt;&lt;FONT color="#800080"&gt;Contact us&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Arial"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2007 22:21:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/cross-typed-usage-penalties/m-p/855091#M7217</guid>
      <dc:creator>Intel_Software_Netw1</dc:creator>
      <dc:date>2007-06-12T22:21:32Z</dc:date>
    </item>
  </channel>
</rss>

