<?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 Thanks for the suggestions. in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174543#M146931</link>
    <description>&lt;P&gt;Thanks for the suggestions.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;My original intent was to quickly determine if there are any uppercase characters in the string to avoid doing the conversion if it was not needed or had already been done.&amp;nbsp; thought MAXVAL could tell me that.&amp;nbsp;&amp;nbsp; I think the organization of this code means the lowercase() &amp;nbsp;routine gets called multiple times at many levels of the hierarchy to assure case independent string comparisons.&lt;/P&gt;

&lt;P&gt;Based on vtune running in visual studio 2015/ifort 17.1 on a test case, of 3300 total seconds, for_cpstr takes up 600 seconds, lowcase() subroutine 17 seconds, so seems like room for improvement.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I tried the code from RepeatOffender (Thanks) and the total time reduced (system load???) but time for the revised lowcase subroutine with the logic above (RepeatOffender ) increased, probably because the string length is &amp;gt;&amp;gt; the len_trim length.&amp;nbsp; So I am trying what I hope will avoid the full string length:&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;nlen = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;len_trim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(string)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;temp(1:nlen) = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;transfer&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(string(1:nlen),temp(1:nlen))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;string = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;transfer&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;merge&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;IOR&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(temp(1:nlen),32_INT8), temp(1:nlen), 65_INT8 &amp;lt;= temp .AND. temp &amp;lt;= 90_INT8), string(1:nlen))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;I do not have a range spec&amp;nbsp;(1:nlen) on the temp in the logical part of the expression.&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;65_INT8 &amp;lt;= temp .AND. temp &amp;lt;= 90_INT8), &lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I will also try mecej4 IPP library.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Is there any intel C documentation accessible?&amp;nbsp;&amp;nbsp;&amp;nbsp; I ask for this but also I heavily use ifort OPEN(BUFFERED...) and if there is a way (or a need) to do this for C++ code (ifort ascii write defaults to flush after every write, correct?).&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Apr 2018 02:24:46 GMT</pubDate>
    <dc:creator>Scott_L_</dc:creator>
    <dc:date>2018-04-25T02:24:46Z</dc:date>
    <item>
      <title>scan string for uper/lower case</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174540#M146928</link>
      <description>&lt;P&gt;I find our code is spending a lot of time assuring strings are lower case.&amp;nbsp;&amp;nbsp; I hoped MAXVAL would scan a character string to see if it was all lowercase already but MAXVAL only works on character arrays, not strings.&amp;nbsp;&amp;nbsp; If there is a faster way to convert strings to all lowercase or check to see if it has any uppercase characters already, that would be really helpful.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;thanks&lt;/P&gt;

&lt;P&gt;scott&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 17:23:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174540#M146928</guid>
      <dc:creator>Scott_L_</dc:creator>
      <dc:date>2018-04-24T17:23:45Z</dc:date>
    </item>
    <item>
      <title>Assuming ASCII internal</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174541#M146929</link>
      <description>&lt;P&gt;Assuming ASCII internal representation and latin characters, it's possible to convert the string to an&amp;nbsp;array of integers and perform the conversion efficiently on the array. Alternatively you could have used TRANSFER to convert the string to an array and back so as to convert individual characters.&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;module M
&amp;nbsp;&amp;nbsp; implicit none
&amp;nbsp;&amp;nbsp; contains
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function tolower(string)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; use ISO_FORTRAN_ENV
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; character(*) string
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; character(len(string)) tolower
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; integer(INT8) temp(len(string))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; temp = transfer(string,temp)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tolower = transfer(merge(IOR(temp,32_INT8), temp, &amp;amp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 65_INT8 &amp;lt;= temp .AND. temp &amp;lt;= 90_INT8), tolower)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end function tolower
end module M

program P
&amp;nbsp;&amp;nbsp; use M
&amp;nbsp;&amp;nbsp; implicit none
&amp;nbsp;&amp;nbsp; character(50) mess
&amp;nbsp;&amp;nbsp; mess = 'lEavE $10,000 By tHe Oak trEe On The hIll'
&amp;nbsp;&amp;nbsp; write(*,'(a)') tolower(mess)
end program P
&lt;/PRE&gt;

&lt;P&gt;Output with ifort:&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;leave $10,000 by the oak tree on the hill&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2018 18:15:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174541#M146929</guid>
      <dc:creator>JVanB</dc:creator>
      <dc:date>2018-04-24T18:15:22Z</dc:date>
    </item>
    <item>
      <title>Scott, you did not state what</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174542#M146930</link>
      <description>&lt;P&gt;Scott, you did not state what you wish to do with the string if it contains upper case characters. The following comments assume that converting to all lower case will suffice.&lt;/P&gt;

&lt;P&gt;The IPP library (included in Parallel Studio with the C compiler) contains a number of string processing subroutines that you can use. For example,&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;program P
   implicit none
!DIR$ ALIAS IPPLcase,'ippsLowercaseLatin_8u_I'
   integer i
   character(40) string
   string = 'yOU WiLl `FInD'' iT @ThE [13{ oaK tRee.'
   write(*,'(a)') trim(string)
   call IPPLcase(string)
   write(*,'(a)') trim(string)
end program P
&lt;/PRE&gt;

&lt;P&gt;Compile and link using the command&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;ifort lcaseI.f90 ippch.lib&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 01:43:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174542#M146930</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2018-04-25T01:43:36Z</dc:date>
    </item>
    <item>
      <title>Thanks for the suggestions.</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174543#M146931</link>
      <description>&lt;P&gt;Thanks for the suggestions.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;My original intent was to quickly determine if there are any uppercase characters in the string to avoid doing the conversion if it was not needed or had already been done.&amp;nbsp; thought MAXVAL could tell me that.&amp;nbsp;&amp;nbsp; I think the organization of this code means the lowercase() &amp;nbsp;routine gets called multiple times at many levels of the hierarchy to assure case independent string comparisons.&lt;/P&gt;

&lt;P&gt;Based on vtune running in visual studio 2015/ifort 17.1 on a test case, of 3300 total seconds, for_cpstr takes up 600 seconds, lowcase() subroutine 17 seconds, so seems like room for improvement.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I tried the code from RepeatOffender (Thanks) and the total time reduced (system load???) but time for the revised lowcase subroutine with the logic above (RepeatOffender ) increased, probably because the string length is &amp;gt;&amp;gt; the len_trim length.&amp;nbsp; So I am trying what I hope will avoid the full string length:&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;nlen = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;len_trim&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(string)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;temp(1:nlen) = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;transfer&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(string(1:nlen),temp(1:nlen))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;string = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;transfer&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;merge&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;&lt;FONT color="#0000ff" face="Consolas" size="2"&gt;IOR&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;(temp(1:nlen),32_INT8), temp(1:nlen), 65_INT8 &amp;lt;= temp .AND. temp &amp;lt;= 90_INT8), string(1:nlen))&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;FONT face="Consolas" size="2"&gt;&lt;FONT face="Consolas" size="2"&gt;I do not have a range spec&amp;nbsp;(1:nlen) on the temp in the logical part of the expression.&amp;nbsp;&amp;nbsp; &lt;/FONT&gt;65_INT8 &amp;lt;= temp .AND. temp &amp;lt;= 90_INT8), &lt;/FONT&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I will also try mecej4 IPP library.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Is there any intel C documentation accessible?&amp;nbsp;&amp;nbsp;&amp;nbsp; I ask for this but also I heavily use ifort OPEN(BUFFERED...) and if there is a way (or a need) to do this for C++ code (ifort ascii write defaults to flush after every write, correct?).&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 02:24:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174543#M146931</guid>
      <dc:creator>Scott_L_</dc:creator>
      <dc:date>2018-04-25T02:24:46Z</dc:date>
    </item>
    <item>
      <title>Here is the documentation for</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174544#M146932</link>
      <description>&lt;P&gt;Here is the documentation for the string functions in IPP:&amp;nbsp;&lt;SPAN style="font-size: 19.512px;"&gt;&lt;A href="https://software.intel.com/en-us/ipp-dev-reference-string-manipulation" target="_blank"&gt;https://software.intel.com/en-us/ipp-dev-reference-string-manipulation&lt;/A&gt; . There are several items there that you could use.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;If, after detecting uppercase characters, you will convert to lowercase, it may be faster to "assume the worst" and convert every candidate string to lowercase without trying to detect if the conversion is needed. In other words, "Shift first and ask questions later".&lt;/P&gt;

&lt;P&gt;See RO's contributions of AVX assembly routines to uppercase strings in&amp;nbsp;&lt;SPAN style="font-size: 19.512px;"&gt;&lt;A href="https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/757222#comment-1918919" target="_blank"&gt;https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/757222#comment-1918919&lt;/A&gt; . As he points out, any temporary variables such as your &lt;EM&gt;temp&lt;/EM&gt; should be avoided since they have a high cost in memory accesses.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;I don't understand your question about buffering. If you call IPP routines to do string operations, there is no file I/O involved. Nevertheless, standard C routines setbuf() and setvbuf() are available,if you find them relevant.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 08:50:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174544#M146932</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2018-04-25T08:50:00Z</dc:date>
    </item>
    <item>
      <title>Hello</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174545#M146933</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;

&lt;P&gt;Nothing is magical.&lt;/P&gt;

&lt;P&gt;Scanning a string to find a character implies to loop into the string until you find what you want.&lt;/P&gt;

&lt;P&gt;MAXVAL must do the same loop so it will waste time if you use it before making the conversion.&lt;/P&gt;

&lt;P&gt;So the simplest will be the best especially &lt;SPAN id="result_box" lang="en"&gt;&lt;SPAN&gt;for the readability of the code.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN lang="en"&gt;&lt;SPAN&gt;Something like that will do the job&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;function to_upper(string)
...
to_upper=string
do i=1,len(to_upper)
    if( to_upper&lt;I&gt; .... ) to_upper&lt;I&gt;=...
enddo
end function&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 10:36:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174545#M146933</guid>
      <dc:creator>GVautier</dc:creator>
      <dc:date>2018-04-25T10:36:00Z</dc:date>
    </item>
    <item>
      <title>I am all for simplicity, but</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174546#M146934</link>
      <description>&lt;P&gt;I am all for simplicity, but sometimes the simple version can be awfully slow. The O.P. has stated that these conversions are consuming quite a bit of time. He could certainly try to rearrange his code to reduce the number of case conversions/inspections, but that may not be enough.&lt;/P&gt;

&lt;P&gt;The simple table lookup case-shift subroutine given in&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;&lt;A href="https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/757222#comment-1918644" target="_blank"&gt;https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/757222#comment-1918644&lt;/A&gt; converted the KJV Bible text (4.5 MB) with a throughput of&amp;nbsp;0.0082 bytes/clock, or about 120 clock ticks per character. An SSE case conversion routine (http://www.alfredklomp.com/programming/sse-strings/) achieved 0.8 bytes/clock (both times on my 12 year old PC with an AMD Athlon 4200+ running W10). Repeat Offender's AVX routine achieved about 5 bytes/clock (on a different PC, of course). &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Thus, the more complex SSE/AVX version can give a speed-up of 100 to 400 times. Part of the reason for the speed up is that the vectorized SSE2 instructions process 16 characters at a time (32 at a time with AVX).&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 16:06:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174546#M146934</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2018-04-25T16:06:00Z</dc:date>
    </item>
    <item>
      <title>Scott,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174547#M146935</link>
      <description>&lt;P&gt;Scott,&lt;/P&gt;

&lt;P&gt;Your original post did not state if the low-case operation was to be performed in place. Assuming it is, and if the program is to have a long life time, then the newer AVX512 instruction set can be utilized via C interoperability or through use of an AVX512 optimized in situ low-case-er.&lt;/P&gt;

&lt;P&gt;The AVX512 instruction set has test that produce a bit mask of true which can be subsequently pass into a general purpose register (i.e. uint64_t variable). This can be used to test then conditionally write only the vectors that require updating, assuming you have significant runs of lower case sub-strings that do not require updating.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Wed, 25 Apr 2018 20:42:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174547#M146935</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2018-04-25T20:42:37Z</dc:date>
    </item>
    <item>
      <title>If each string is assignated</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174548#M146936</link>
      <description>&lt;P&gt;If each string is assignated once but used many times it will be smarter to do the conversion just after assignation and then presume it's uppercase. It's the most efficient way do solve the problem.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 06:25:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/scan-string-for-uper-lower-case/m-p/1174548#M146936</guid>
      <dc:creator>GVautier</dc:creator>
      <dc:date>2018-04-26T06:25:18Z</dc:date>
    </item>
  </channel>
</rss>

