Subject: CVS commit: syssrc/sys/lib/libkern/arch/sh3
To: None <source-changes@netbsd.org>
From: ITOH Yasufumi <itohy@netbsd.org>
List: source-changes
Date: 08/24/2002 09:30:37
Module Name: syssrc
Committed By: itohy
Date: Sat Aug 24 06:30:36 UTC 2002
Added Files:
basesrc/lib/libc/arch/sh3/string: ffs.S
syssrc/sys/lib/libkern/arch/sh3: ffs.S
Log Message:
Assembly version of ffs(3).
Confirmed to return the same value as that of the C version.
The results of a simple benchmark on SH-4 200MHz, is shown below.
I think this shows acceptable performance.
return value C version this version speed
of ffs() (ns/call) (ns/call) ratio
------------ --------- ------------ -----
0 86 86 1.00
1 110 86 1.27
2 132 86 1.53
3 165 105 1.57
4 201 104 1.93
5 237 111 2.13
6 271 111 2.44
7 307 126 2.43
8 342 125 2.73
9 376 122 3.08
10 410 121 3.38
11 446 139 3.20
12 483 140 3.45
13 518 146 3.54
14 551 146 3.77
15 587 161 3.64
16 624 162 3.85
17 658 141 4.66
18 694 142 4.88
19 727 160 4.54
20 764 161 4.74
21 799 167 4.78
22 834 167 4.99
23 868 181 4.79
24 903 181 4.98
25 939 146 6.43
26 974 146 6.67
27 1009 166 6.07
28 1044 165 6.32
29 1080 171 6.31
30 1115 171 6.52
31 1151 185 6.22
32 1185 186 6.37
To generate a diff of this commit:
cvs rdiff -r0 -r1.1 basesrc/lib/libc/arch/sh3/string/ffs.S
cvs rdiff -r0 -r1.1 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.