Subject: CVS commit: basesrc/lib/libc/arch/sh3/string
To: None <source-changes@netbsd.org>
From: ITOH Yasufumi <itohy@netbsd.org>
List: source-changes
Date: 08/28/2002 18:34:37
Module Name: basesrc
Committed By: itohy
Date: Wed Aug 28 15:34:37 UTC 2002
Modified Files:
basesrc/lib/libc/arch/sh3/string: ffs.S
syssrc/sys/lib/libkern/arch/sh3: ffs.S
Log Message:
Slightly improved version of ffs(3).
Partially from SHIMIZU Ryo <ryo@iij.ad.jp>. Thanks.
Some cases are slower, but other most cases are faster.
Here's a benchmark on SH-4 200MHz.
return value C version previous vers this version speed ratio
of ffs() (ns/call) *1 (ns/call) (ns/call) *2 (*1/*2)
------------ ------------ ------------- ------------ -----------
0 86 86 81 1.06
1 110 86 106 *(slower) 1.04
2 132 86 106 * 1.25
3 165 105 117 * 1.41
4 201 104 116 * 1.73
5 237 111 107 2.21
6 271 111 106 2.56
7 307 126 116 2.65
8 342 125 116 2.95
9 376 122 126 * 2.98
10 410 121 127 * 3.23
11 446 139 136 3.28
12 483 140 134 3.60
13 518 146 125 4.14
14 551 146 126 4.37
15 587 161 135 4.35
16 624 162 136 4.59
17 658 141 139 4.73
18 694 142 140 4.96
19 727 160 148 4.91
20 764 161 150 5.09
21 799 167 141 5.67
22 834 167 142 5.87
23 868 181 152 5.71
24 903 181 153 5.90
25 939 146 140 6.71
26 974 146 141 6.91
27 1009 166 152 6.64
28 1044 165 148 7.05
29 1080 171 141 7.66
30 1115 171 141 7.91
31 1151 185 151 7.62
32 1185 186 151 7.85
To generate a diff of this commit:
cvs rdiff -r1.2 -r1.3 basesrc/lib/libc/arch/sh3/string/ffs.S
cvs rdiff -r1.2 -r1.3 syssrc/sys/lib/libkern/arch/sh3/ffs.S
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.