This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15884] Big performance problem in strcoll
- From: "neleai at seznam dot cz" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 23 Aug 2013 18:26:40 +0000
- Subject: [Bug libc/15884] Big performance problem in strcoll
- Auto-submitted: auto-generated
- References: <bug-15884-131 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15884
Ondrej Bilka <neleai at seznam dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |---
Summary|Big performance regression |Big performance problem in
|in strcoll |strcoll
--- Comment #3 from Ondrej Bilka <neleai at seznam dot cz> ---
I thougth that originaly a comparison was done character-by-character without
useless allocation, after looking through history I was mistaken. Changing
regression->problem.
> Also, the test case is invalid. It compares a space with an exclamation
> point, both of which are ignored as collation sequences due to which the
> algorithm actually goes through all the passes for the string before it
> compares them on a binary level. Replace 32 and 33 with 'a' and 'b' and
> you'll see the difference.
it is still there, just smaller multiplicative factor hidden it into loop
overhead for smaller lengths. When changed to a/b time becomes:
ondra@neklekam:~$ gcc -DN=1 strcoll.c ; time ./a.out
real 0m0.040s
user 0m0.037s
sys 0m0.000s
ondra@neklekam:~$ gcc -DN=10 strcoll.c ; time ./a.out
real 0m0.039s
user 0m0.037s
sys 0m0.003s
ondra@neklekam:~$ gcc -DN=100 strcoll.c ; time ./a.out
real 0m0.044s
user 0m0.043s
sys 0m0.007s
ondra@neklekam:~$ gcc -DN=1000 strcoll.c ; time ./a.out
real 0m0.115s
user 0m0.113s
sys 0m0.000s
ondra@neklekam:~$ gcc -DN=10000 strcoll.c ; time ./a.out
real 0m0.737s
user 0m0.737s
sys 0m0.000s
ondra@neklekam:~$ gcc -DN=100000 strcoll.c ; time ./a.out
real 0m7.443s
user 0m7.443s
sys 0m0.000s
--
You are receiving this mail because:
You are on the CC list for the bug.