stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <>
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
             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:

$ 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[] = {

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

On HP-UX 11.23/PA:

real    0m1.060s
user    0m0.290s
sys     0m0.510s

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

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

View raw message