incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Teleman <>
Subject Re: STDCXX-1056 [was: Re: STDCXX forks]
Date Thu, 13 Sep 2012 05:40:08 GMT
On Wed, Sep 12, 2012 at 9:04 AM, Liviu Nicoara <> wrote:
> That would be very helpful!

I ran your test case - with your implementation of _numpunct.h - and I
even wrote a variant of it because I wanted to be able to test with
more than one locale at a time:

They pass and they did not cause assertions. I initially had a concern
about the case where two or more different threads ask for facet data
on the same static locale object, ahd they happen to do so exactly at
the same time. But there is a mutex in __rw_setlocale which will
serialize this. Incidentally there are some optimizations which could
be done in __rw_setlocale's constructor as well, along with the
optimizations for the "C" locale in punct.cpp Martin mentioned

The performance of is also much better with your
_numpunct.h patch:

real 668.93
user 804.00
sys 34.24


Stefan Teleman
KDE e.V.

View raw message