From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Locale agnostic unicode text |
Date: | 2005-01-24 18:25:01 |
Message-ID: | 23318.1106591101@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> The results were
>> In C locale, SQL_ASCII encoding: 820 ms
>> In C locale, UNICODE encoding: 825 ms
>> Using Dawid's functions: 62010 ms
>> Stripped-down functions: 21010 ms
> I don't think these are fair comparisons though. The C locale probably
> short-circuits much of the work that strxfrm/strcoll have to do for other
> locales. I think the fair comparison is to compare a database initdb'd in a
> non-C locale like en_US using strcoll with no setlocale calls against one
> calling setlocale twice for every record.
OK, that's fair:
In en_US locale: 1900 ms
which makes it only a factor of 20 slowdown to use setlocale every time...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2005-01-24 18:31:34 | userlock changes for 8.1/8.2 |
Previous Message | Greg Stark | 2005-01-24 18:00:50 | Re: Locale agnostic unicode text |