<?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: performance problem on string usage in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803898#M942178</link>
    <description>I measured CPU usage.&lt;BR /&gt;I run the program with one argument which is the number of loops.&lt;BR /&gt;Run it 1 000 000 times and &lt;BR /&gt;add -G as aCC directive to get a profile check the CPU usage with gprof.&lt;BR /&gt;&lt;BR /&gt;The reason why we did this small test is the global poor performance whe got when porting our applications from Linux and AIX to HPUX.&lt;BR /&gt;It is a C++ application ensemble (multi-threaded and multiprocesses) which switches messages and applies different actions on the messages . These messages are mainly characters strings and we are using STL a lot.&lt;BR /&gt;We are using glance to take measurement on the real-time.&lt;BR /&gt;By the we constated that most of the system calls like malloc are not considered as system calls by glance.</description>
    <pubDate>Wed, 11 Sep 2002 08:26:55 GMT</pubDate>
    <dc:creator>inactive account</dc:creator>
    <dc:date>2002-09-11T08:26:55Z</dc:date>
    <item>
      <title>performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803891#M942171</link>
      <description>I encounter great problems of performance when working on strings on HPUX. The CPU usage is far beyond all other OS and CPUS.&lt;BR /&gt;I join a small benchmark we did and the results on LINUX, AIX and HPUX.&lt;BR /&gt;&lt;BR /&gt;As my applications deal very much with strings, does anybody knows where to look at or am I missing something?&lt;BR /&gt;&amp;gt; mode string&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; HPISIM              17.200    (HP-UX 32 bits)&lt;BR /&gt;&amp;gt; HPISIM 64b       15.400    (HP-UX 64 bits)&lt;BR /&gt;&amp;gt; Jupiter                   2.500    (Linux)&lt;BR /&gt;&amp;gt; SLElusis                8.600    (AIX)&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; mode char *&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; HPISIM                  1.900&lt;BR /&gt;&amp;gt; HPISIM 64b           1.700&lt;BR /&gt;&amp;gt; Jupiter                     0.400&lt;BR /&gt;&amp;gt; SLElusis                  1.300&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; #include &lt;STRING&gt;&lt;BR /&gt;&amp;gt; #include &lt;LIST&gt;&lt;BR /&gt;&amp;gt; #include &lt;MAP&gt;&lt;BR /&gt;&amp;gt; #include &lt;SET&gt;&lt;BR /&gt;&amp;gt; #include &lt;VECTOR&gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; using namespace std;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; #include &lt;STDIO.H&gt;&lt;BR /&gt;&amp;gt; #include &lt;ERRNO.H&gt;&lt;BR /&gt;&amp;gt; #include &lt;STRING.H&gt;&lt;BR /&gt;&amp;gt; #include &lt;LIMITS.H&gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; int main(int a, char *b[])&lt;BR /&gt;&amp;gt;   {&lt;BR /&gt;&amp;gt;    int l = atoi(b[1]);&lt;BR /&gt;&amp;gt;    int i;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;    if (a == 2)&lt;BR /&gt;&amp;gt;      {&lt;BR /&gt;&amp;gt;       for (i = 0; i&amp;lt; l; i++)&lt;BR /&gt;&amp;gt;         {&lt;BR /&gt;&amp;gt;          string toto("boujour");&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;          toto += " ?? toi";&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;          if (toto.substr(2,3) == "uju")&lt;BR /&gt;&amp;gt;            {&lt;BR /&gt;&amp;gt;             const char * a = toto.c_str();&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;             //printf("a=%s\n", a);&lt;BR /&gt;&amp;gt;            }&lt;BR /&gt;&amp;gt;           else&lt;BR /&gt;&amp;gt;            {&lt;BR /&gt;&amp;gt;             const char * b = toto.c_str();&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;             //printf("b=%s\n", b);&lt;BR /&gt;&amp;gt;            }&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;         }&lt;BR /&gt;&amp;gt;      }&lt;BR /&gt;&amp;gt;     else&lt;BR /&gt;&amp;gt;      {&lt;BR /&gt;&amp;gt;       for (i = 0; i&amp;lt; l; i++)&lt;BR /&gt;&amp;gt;         {&lt;BR /&gt;&amp;gt;          char *toto;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;          toto = (char *)malloc( 50 );&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;          strcpy(toto,"boujour");&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;          strcat(toto , " ?? toi");&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;          if (!memcmp(toto+2 , "uju" , 3))&lt;BR /&gt;&amp;gt;            {&lt;BR /&gt;&amp;gt;             toto[13]  = '\0';&lt;BR /&gt;&amp;gt;             const char * a = toto;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;             //printf("a=%s\n", a);&lt;BR /&gt;&amp;gt;            }&lt;BR /&gt;&amp;gt;           else&lt;BR /&gt;&amp;gt;            {&lt;BR /&gt;&amp;gt;             toto[13]  = '\0';&lt;BR /&gt;&amp;gt;             const char * b = toto;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;             //printf("b=%s\n", b);&lt;BR /&gt;&amp;gt;            }&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;          free (toto) ;&lt;BR /&gt;&amp;gt;         }&lt;BR /&gt;&amp;gt;      }&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; }&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&lt;/LIMITS.H&gt;&lt;/STRING.H&gt;&lt;/ERRNO.H&gt;&lt;/STDIO.H&gt;&lt;/VECTOR&gt;&lt;/SET&gt;&lt;/MAP&gt;&lt;/LIST&gt;&lt;/STRING&gt;</description>
      <pubDate>Wed, 11 Sep 2002 06:49:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803891#M942171</guid>
      <dc:creator>inactive account</dc:creator>
      <dc:date>2002-09-11T06:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803892#M942172</link>
      <description>you may be better off refering this to the hp developer site:&lt;BR /&gt;&lt;A href="http://www.hp.com/go/developer" target="_blank"&gt;http://www.hp.com/go/developer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;In any case you spelt bonjour wrong!!&lt;BR /&gt;&lt;BR /&gt;Later,&lt;BR /&gt;Bill</description>
      <pubDate>Wed, 11 Sep 2002 07:04:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803892#M942172</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2002-09-11T07:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803893#M942173</link>
      <description>I will try it on some servers here if you give me the exact code and compile options - I cant compile what you have listed already, get lots of errors.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Sep 2002 07:04:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803893#M942173</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2002-09-11T07:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803894#M942174</link>
      <description>You are right Bill for bonjour !&lt;BR /&gt;but I am not sure it's a dev issue because it seems to be a general problem with HP.&lt;BR /&gt;All the benches we are doing show poor results on HP against Linux and AIX&lt;BR /&gt;&lt;BR /&gt;Sorry Stephan here are my compiler 's options on HPUX:&lt;BR /&gt;&lt;BR /&gt;/opt/aCC/bin/aCC  -D__unix__ -D__hpux__  -mt -AA -ext +DA1.1 +p +W829,921,652  -DTGVERSION=\"01.00\"     -I../tg_sys/include    -I../tg_sys/include  -I../tg_loaddic_monp/include  -I../tg_disp/include  -o bin/essai_malloc EXEC/essai_malloc.cxx -L./lib    -L../tg_sys/lib  -L../tg_sys/lib  -L../tg_loaddic_monp/lib  -L../tg_disp/lib  -ltg_disp  -ltg_loaddic_monp  -ltg_sys   -ltg_disp  -ltg_loaddic_monp  -ltg_sys  2&amp;gt; EXEC/essai_malloc.out&lt;BR /&gt;he</description>
      <pubDate>Wed, 11 Sep 2002 07:15:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803894#M942174</guid>
      <dc:creator>inactive account</dc:creator>
      <dc:date>2002-09-11T07:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803895#M942175</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I can compile the code using this line:&lt;BR /&gt;&lt;BR /&gt;aCC -AA -o string.exe string.c&lt;BR /&gt;&lt;BR /&gt;Please indicate  how you invoke the program&lt;BR /&gt;and how you measure  the time etc.&lt;BR /&gt;&lt;BR /&gt;Olav</description>
      <pubDate>Wed, 11 Sep 2002 07:18:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803895#M942175</guid>
      <dc:creator>Olav Baadsvik</dc:creator>
      <dc:date>2002-09-11T07:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803896#M942176</link>
      <description>in this case we did a check of CPU usage at first and then we use -G option and gprof.&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Sep 2002 07:38:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803896#M942176</guid>
      <dc:creator>inactive account</dc:creator>
      <dc:date>2002-09-11T07:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803897#M942177</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;Hi&lt;BR /&gt;&lt;BR /&gt;I still do not know how you run this program&lt;BR /&gt;and what you measure.&lt;BR /&gt;If I shall be able to measure if the &lt;BR /&gt;results are reasonable (or the same as you get)&lt;BR /&gt;I need to know exactly how you perform&lt;BR /&gt;your test.&lt;BR /&gt;&lt;BR /&gt;What kind of machine are you running on,&lt;BR /&gt;what version of aCC?&lt;BR /&gt;&lt;BR /&gt;Olav</description>
      <pubDate>Wed, 11 Sep 2002 08:00:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803897#M942177</guid>
      <dc:creator>Olav Baadsvik</dc:creator>
      <dc:date>2002-09-11T08:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803898#M942178</link>
      <description>I measured CPU usage.&lt;BR /&gt;I run the program with one argument which is the number of loops.&lt;BR /&gt;Run it 1 000 000 times and &lt;BR /&gt;add -G as aCC directive to get a profile check the CPU usage with gprof.&lt;BR /&gt;&lt;BR /&gt;The reason why we did this small test is the global poor performance whe got when porting our applications from Linux and AIX to HPUX.&lt;BR /&gt;It is a C++ application ensemble (multi-threaded and multiprocesses) which switches messages and applies different actions on the messages . These messages are mainly characters strings and we are using STL a lot.&lt;BR /&gt;We are using glance to take measurement on the real-time.&lt;BR /&gt;By the we constated that most of the system calls like malloc are not considered as system calls by glance.</description>
      <pubDate>Wed, 11 Sep 2002 08:26:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803898#M942178</guid>
      <dc:creator>inactive account</dc:creator>
      <dc:date>2002-09-11T08:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803899#M942179</link>
      <description>&lt;BR /&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I advise you to check your compiler-options.&lt;BR /&gt;Compiling with different options give&lt;BR /&gt;a big difference in execution time for your&lt;BR /&gt;test-program.&lt;BR /&gt;I have performed the test by starting the&lt;BR /&gt;program in the following way:&lt;BR /&gt;&lt;BR /&gt;  time string.exe 1000000&lt;BR /&gt;&lt;BR /&gt;Compiler-options       time (realtime)&lt;BR /&gt;&lt;BR /&gt;-AA -G +DA2.0          30.2  sec&lt;BR /&gt;-AA  +DA1.1            21.35 sec&lt;BR /&gt;-AA  -G +DA1.1         35.76 sec&lt;BR /&gt;-AA  +DA2.0            15.76 sec&lt;BR /&gt;-AA  +DA2.0  +O3       11.07 sec&lt;BR /&gt;&lt;BR /&gt;The  +DA2.0  tells the compiler to generate&lt;BR /&gt;code for a PARISC2.0 processer.&lt;BR /&gt;In the compile-info you gave the code is&lt;BR /&gt;generated for a PARISC1.1&lt;BR /&gt;PARISC2.0  is the PARISC-version in all new&lt;BR /&gt;machines.  &lt;BR /&gt;+O3  tells the compiler to optimize the code.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Olav&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Sep 2002 09:32:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803899#M942179</guid>
      <dc:creator>Olav Baadsvik</dc:creator>
      <dc:date>2002-09-11T09:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803900#M942180</link>
      <description>Thanks Olav&lt;BR /&gt;But I can't use the optimise 3 level and I can't use PA2.0 because:&lt;BR /&gt;- 1) compile of my objects are rejected with the +O3 option (I'm using a lot of throws/catch and compiler says that's too much).&lt;BR /&gt;-2) the target system is Stratus running HPUX only in the 32bits mode...&lt;BR /&gt;&lt;BR /&gt;too bad isn't it?</description>
      <pubDate>Wed, 11 Sep 2002 09:37:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803900#M942180</guid>
      <dc:creator>inactive account</dc:creator>
      <dc:date>2002-09-11T09:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803901#M942181</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The fact that you have a target machine&lt;BR /&gt;that is running hp-ux 32bit  does not mean&lt;BR /&gt;that you can not use the option&lt;BR /&gt;+DA2.0&lt;BR /&gt;I used  a C200  hp-ux 11.00  (32-bit)&lt;BR /&gt;for this test.&lt;BR /&gt;&lt;BR /&gt;This means that unless your target-machine is&lt;BR /&gt;very old (using PARISC1.1), you should use&lt;BR /&gt;+DA2.0&lt;BR /&gt;&lt;BR /&gt;(the option for compiling for 64-bit is&lt;BR /&gt;+DA2.0W  )&lt;BR /&gt;&lt;BR /&gt;Olav&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Sep 2002 09:47:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803901#M942181</guid>
      <dc:creator>Olav Baadsvik</dc:creator>
      <dc:date>2002-09-11T09:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803902#M942182</link>
      <description>I try the DA2.0 option without optimization but I don't see any improvement on the CPU usage for my real application...&lt;BR /&gt;I will retry with +O2 optimize level and check...&lt;BR /&gt;&lt;BR /&gt;Thank you anyway Olav!</description>
      <pubDate>Wed, 11 Sep 2002 11:33:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803902#M942182</guid>
      <dc:creator>inactive account</dc:creator>
      <dc:date>2002-09-11T11:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: performance problem on string usage</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803903#M942183</link>
      <description>Sometimes +Onolimit can help to raise the bar for +O3</description>
      <pubDate>Wed, 11 Sep 2002 11:56:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/performance-problem-on-string-usage/m-p/2803903#M942183</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-09-11T11:56:57Z</dc:date>
    </item>
  </channel>
</rss>

