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] Commented: (STDCXX-823) [HP-UX] poor performance of setlocale() with +DD64
Date Wed, 02 Apr 2008 14:31:24 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12584586#action_12584586
] 

Martin Sebor commented on STDCXX-823:
-------------------------------------

Here's Dennis Handly's response:

-------- Original Message --------
Subject: Re:  poor performance of setlocale() in +DD64
Date: Tue, 1 Apr 2008 23:21:12 -0700 (PDT)
From: Dennis Handly <dhandly AT cup.hp.com>
To: acxx AT cup.hp.com, sebor AT roguewave.com
...
If you have lots of time, you might try tusc on each of the 4.

The tusc output shows:
{noformat}
$ wc -l rw_loc_??.out
41195 rw_loc_32.out
201038 rw_loc_64.out
{noformat}
These seem to indicate that "cache" you mentioned.
32 bit does fstat, open and close.
64 bit seems to do the dlopen().

Ok, the source says:
{noformat}
/* Max # of locales to be cached.  10 locales are considered sufficient */
/* in most situations.
#define LCACHE_MAX      10
{noformat}

You overran the cache.  Are you happy with just 10?
Here are the times for 7:
{noformat}
$ time rw_locale_64s 10000
real    0m0.71s user    0m0.70s sys     0m0.01s

$ time rw_locale_32s 10000
real    0m0.82s user    0m0.80s sys     0m0.00s
{noformat}

> [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