NetBSD/sys/lib
itohy f89823c1f8 Save 1-4 instructions on all cases except for the ret=0 case.
This is probably the last version from me. :)
You are welcome to speed it up, of course. :)

Here's a benchmark on SH-4 200MHz.
9.2% faster if all the cases occur evenly.

return value	C version	previous vers	this version	speed ratio
of ffs()	(ns/call) *1	(ns/call)	(ns/call) *2	(*1/*2)
------------	------------	-------------	------------	-----------
 0		  86		 81		 81		1.06
 1		 110		106		 91		1.21
 2		 132		106		 92		1.43
 3		 165		117		 96		1.72
 4		 201		116		 95		2.12
 5		 237		107		 99		2.39
 6		 271		106		101		2.68
 7		 307		116		107		2.87
 8		 342		116		105		3.26
 9		 376		126		111		3.39
10		 410		127		110		3.73
11		 446		136		115		3.88
12		 483		134		116		4.16
13		 518		125		119		4.35
14		 551		126		120		4.59
15		 587		135		127		4.62
16		 624		136		126		4.95
17		 658		139		126		5.22
18		 694		140		126		5.51
19		 727		148		131		5.55
20		 764		150		131		5.83
21		 799		141		135		5.92
22		 834		142		135		6.18
23		 868		152		140		6.20
24		 903		153		142		6.36
25		 939		140		127		7.39
26		 974		141		126		7.73
27		1009		152		131		7.70
28		1044		148		130		8.03
29		1080		141		136		7.94
30		1115		141		136		8.20
31		1151		151		141		8.16
32		1185		151		140		8.46
2002-09-01 13:14:53 +00:00
..
libkern Save 1-4 instructions on all cases except for the ret=0 case. 2002-09-01 13:14:53 +00:00
libsa use exit(int), not exit(void), consistently - even if the arg has no meaning. 2002-06-01 11:40:31 +00:00
libz Fix make breakage. $ZDST != ${ZDST} in make. make clean/cleandir now works. 2002-06-15 19:30:56 +00:00