Re: [xml] RAW && NXT with strncmp()
- From: Daniel Veillard <veillard redhat com>
- To: Bjorn Reese <breese mail1 stofanet dk>
- Cc: xml gnome org
- Subject: Re: [xml] RAW && NXT with strncmp()
- Date: Wed, 1 Oct 2003 14:13:55 -0400
On Wed, Oct 01, 2003 at 06:47:31PM +0200, Bjorn Reese wrote:
On Wed, 2003-10-01 at 15:50, Daniel Veillard wrote:
That I was looking at it this yesterday actually but I don't feel
that confident about such a change, yet ...
The libc string functions tend to be highly optimized.
yeah, I still have a hint from Ulrich Drepper about a way to speed
up the char boundaries test in the internal loop testing CharData,
one day maybe ...
Time for informal benchmarking...
[breese stellifer:/home/breese/junk] gcc -O2 compare.c
[breese stellifer:/home/breese/junk] time ./a.out
4.560u 0.040s 0:04.85 94.8% 0+0k 0+0io 65pf+0w
[breese stellifer:/home/breese/junk] gcc -DUSE_STRNCMP -O2 compare.c
[breese stellifer:/home/breese/junk] time ./a.out
0.930u 0.000s 0:01.03 90.2% 0+0k 0+0io 66pf+0w
I get roughly the same results if I change the content of 'buffer'.
The size gain is less stellar, 8 bytes ...
paphio:~ -> gcc -O2 compare.c
paphio:~ -> nm --print-size -td a.out | grep main
U __libc_start_main@@GLIBC_2.0
134513396 00000072 T main
paphio:~ -> gcc -DUSE_STRNCMP -O2 compare.c
paphio:~ -> nm --print-size -td a.out | grep main
U __libc_start_main@@GLIBC_2.0
134513396 00000064 T main
paphio:~ ->
So Igor, any chance you could do that patch ? Preferably against
CVS or 2.6.0beta3 considering the number of change made since 2.5.11,
thanks
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]