This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, AArch64] Add optimized strchr.


Implementation of strchr for AArch64.  Speedups taken from micro-bench
show the improvements relative to the standard C code.

The use of LD1 means we have identical code for both big- and
little-endian systems.

A speedup (which is taken as the time to run the reference version
divided by the time to run the new version) >1 implies an improvement
(<1 a regression).  The table only shows one sample that regresses and
that's by marginally less than 1%.  The geomean for all the samples is
1.58.

Measurements are on Cortex-A57.

<date>  Richard Earnshaw  <rearnsha@arm.com>

	* sysdeps/aarch64/strchr.S: New file.

OK?

Length	Alignment	Speedup (Ratio: old/new)
32	0		1.11
32	1		1.44
64	0		1.62
64	2		1.63
128	0		2.21
128	3		2.28
256	0		3.17
256	4		2.71
512	0		3.17
512	5		2.68
1024	0		3.37
1024	6		3.25
2048	0		3.5
2048	7		3.59
64	1		1.7
64	1		1.63
64	2		1.64
64	2		1.62
64	3		1.64
64	3		1.62
64	4		1.63
64	4		1.6
64	5		1.64
64	5		1.6
64	6		1.67
64	6		1.61
64	7		1.59
64	7		1.54
0	0		1.05
0	0		1.05
1	0		1.13
1	0		1.07
2	0		1.09
2	0		1.07
3	0		1.14
3	0		1.11
4	0		1.15
4	0		1.1
5	0		1.14
5	0		1.14
6	0		1.15
6	0		1.14
7	0		1.21
7	0		1.18
8	0		1.26
8	0		1.26
9	0		1.37
9	0		1.25
10	0		1.29
10	0		1.25
11	0		1.34
11	0		1.28
12	0		1.35
12	0		1.29
13	0		1.35
13	0		1.32
14	0		1.37
14	0		1.33
15	0		1.4
15	0		1.35
16	0		1.52
16	0		1.36
17	0		1.49
17	0		1.38
18	0		1.41
18	0		1.39
19	0		1.44
19	0		1.41
20	0		1.47
20	0		1.17
21	0		1.24
21	0		1.57
22	0		1.61
22	0		1.53
23	0		1.65
23	0		1.61
24	0		1.72
24	0		1.7
25	0		1.77
25	0		1.65
26	0		1.74
26	0		1.64
27	0		1.88
27	0		1.68
28	0		1.74
28	0		1.69
29	0		1.88
29	0		1.75
30	0		1.79
30	0		1.74
31	0		1.84
31	0		1.8
32	0		1.56
32	1		1.51
64	0		1.74
64	2		1.81
128	0		2.35
128	3		2.59
256	0		3.22
256	4		2.92
512	0		3.09
512	5		2.8
1024	0		3.52
1024	6		3.28
2048	0		3.61
2048	7		3.5
64	1		1.8
64	1		1.73
64	2		1.74
64	2		1.69
64	3		1.75
64	3		1.72
64	4		1.7
64	4		1.68
64	5		1.71
64	5		1.7
64	6		1.73
64	6		1.69
64	7		1.67
64	7		1.65
0	0		1.04
0	0		0.99
1	0		1.11
1	0		1.08
2	0		1.15
2	0		1.12
3	0		1.16
3	0		1.14
4	0		1.17
4	0		1.15
5	0		1.22
5	0		1.19
6	0		1.22
6	0		1.21
7	0		1.24
7	0		1.23
8	0		1.33
8	0		1.33
9	0		1.37
9	0		1.36
10	0		1.4
10	0		1.34
11	0		1.38
11	0		1.39
12	0		1.45
12	0		1.4
13	0		1.52
13	0		1.44
14	0		1.46
14	0		1.43
15	0		1.49
15	0		1.48
16	0		1.49
16	0		1.47
17	0		1.51
17	0		1.47
18	0		1.54
18	0		1.53
19	0		1.6
19	0		1.56
20	0		1.57
20	0		1.58
21	0		1.68
21	0		1.6
22	0		1.59
22	0		1.57
23	0		1.64
23	0		1.62
24	0		1.64
24	0		1.63
25	0		1.71
25	0		1.68
26	0		1.74
26	0		1.66
27	0		1.72
27	0		1.68
28	0		1.77
28	0		1.7
29	0		1.77
29	0		1.74
30	0		1.79
30	0		1.75
31	0		1.82
31	0		1.8
			
		Best improvement	3.61
		Worst regression	0.99
			
		Geomean	1.58

Attachment: strchr-glibc.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]