stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-823) [HP-UX] poor performance of setlocale() with +DD64
Date Wed, 02 Apr 2008 05:13:24 GMT
[HP-UX] poor performance of setlocale() with +DD64
--------------------------------------------------

                 Key: STDCXX-823
                 URL: https://issues.apache.org/jira/browse/STDCXX-823
             Project: C++ Standard Library
          Issue Type: Bug
          Components: External
         Environment: HP-UX
            Reporter: Martin Sebor


The following test case shows a a precipitous dropoff in the performance in setlocale() on
HP-UX (regardless of the hardware architecture, i.e., on both IPF and PA-RISC) between +DD32
and DD64:

On HP-UX 11.31/IPF:

{noformat}
$ cat t.c && aCC t.c && time ./a.out 1000 && aCC +DD64 t.c &&
time ./a.ou>
#include <stdlib.h>
#include <locale.h>

const char* const locales[] = {
    "C",
    "C.iso88591",
    "C.iso885915",
    "C.utf8",
    "univ.utf8",
    "ar_DZ.arabic8",
    "ar_DZ.utf8",
    "ar_SA.arabic8",
    "ar_SA.iso88596",
    "zh_CN.hp15CN",
    "zh_CN.utf8"
};

void test () {
    unsigned i;
    for (i = 0; i != sizeof locales / sizeof *locales; ++i)
        setlocale (LC_ALL, locales [i]);
}

int main (int argc, char *argv[])
{
    unsigned nloops;
    nloops = 1 < argc ? strtoul (argv [1], 0, 0) : 10000;

    while (nloops--)
        test ();
}

real    0m0.466s
user    0m0.180s
sys     0m0.280s

real    0m3.620s
user    0m1.560s
sys     0m2.040s
{noformat}

On HP-UX 11.23/PA:

{noformat}
real    0m1.060s
user    0m0.290s
sys     0m0.510s

real    0m28.550s
user    0m16.110s
sys     0m11.850s
{noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message