This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: strxfrm output stability


Florian Weimer wrote:
>I'll go out on a limb and say that no sane application uses strxfrm,
>either on disk or off.
PostgreSQL uses it to avoid calling strcoll on strings which have
distinctly ordered prefixes in their strxfrm output.

Good catch, and that is what I get for going out on a limb.

Although after looking at it a bit, it is not a true counterexample, as the PostgreSQL code is crazy. For example, it inspects strxfrm output for upper-case ASCII letters?! Overall PostgreSQL's use of strxfrm has the smell of someone applying theory from the 1970s without having measured whether performance actually improves in the typical case nowadays. and it might be amusing to replace PostgreSQL's use of strxfrm with a function that always returns the empty string; the code would still work, and might even run faster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]