Assembler optimizations for libz

John Baldwin jhb at freebsd.org
Sat Jun 3 14:09:35 UTC 2006


On Friday 02 June 2006 21:21, Mikhail Teterin wrote:
> Hello? Is not anyone interested?
> 
> 	http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/96393
> 
> The PR has only i386 code (from libz's contrib/ subdirectory), but since 
> filing it, I have already made an amd64 implementation too, with very nice 
> speed gains (like 30-40%).
> 
> Does anyone care to try and commit to current for starters?

I think lots of people are busy. :)  I glanced at it and still have it on my 
todo list, but have many things on said list.

Can you expand on the problem you have with inffast.S?

Also, it might read better if the flow of the Makefile is:

.if ${MACHINE_ARCH} = "i386"
. if ${CPUTYPE:Mpentium*}
.  if ${CPUTYPE} == "pentium" || ..
.PATH:
.  else
.PATH:
.  endif
SRCS+=	match.S
CFLAGS+= ...
. endif

SRCS+=	inffast.S
CFLAGS+= ...
.PATH: ...
. if ${CPUTYPE} == "pentium-mmx"
CFLAGS+= ...
. endif
.else
SRCS+=	inffast.c
.endif

That is, merge the two i386 sections into one section.

-- 
John Baldwin


More information about the freebsd-current mailing list