Re: tiny step toward threading: reduce dependence on setlocale() - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: tiny step toward threading: reduce dependence on setlocale()
Date
Msg-id 239b7ef6ce058c6b1c77b3a0cfcc70c1cd8968b1.camel@j-davis.com
Whole thread Raw
In response to tiny step toward threading: reduce dependence on setlocale()  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: tiny step toward threading: reduce dependence on setlocale()
List pgsql-hackers
On Wed, 2024-06-05 at 17:23 -0700, Jeff Davis wrote:
> A brief test shows that there may be a performance regression for
> libc
> default collations. But if so, I'm not sure that's avoidable if the
> goal is to take away setlocale. I'll see if removing the extra
> branches
> mitigates it.

I redid the test and didn't see a difference, and then I ran a
standalone microbenchmark to compare strcoll() vs strcoll_l(), and
didn't see a difference there, either.

Another implementation may show a difference, but it doesn't seem to be
a problem for glibc.

I think this patch series is a nice cleanup, as well, making libc more
like the other providers and not dependent on global state.

Regards,
    Jeff Davis




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: question regarding policy for patches to out-of-support branches
Next
From: Alexander Lakhin
Date:
Subject: Re: Assert in heapgettup_pagemode() fails due to underlying buffer change