This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2] aarch64: Optimized implementation of strnlen
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Xuelei Zhang <zhangxuelei4 at huawei dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "siddhesh at gotplt dot org" <siddhesh at gotplt dot org>, Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>, "jiangyikun at huawei dot com" <jiangyikun at huawei dot com>, "yikunkero at gmail dot com" <yikunkero at gmail dot com>
- Cc: nd <nd at arm dot com>
- Date: Tue, 22 Oct 2019 17:57:56 +0000
- Subject: Re: [PATCH v2] aarch64: Optimized implementation of strnlen
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+jC4B+3YLKcEYnx/2gTcaRL0bZ4HPoVzERXgJLCQ9vM=; b=Ua+XTkPkZwWWWqmP563Vi5v3WK6XThdrE1v0oKsy51Ca4m3/LYfCIKZkB4cQLZ+HA1WkTEG0E80F0qBRWWReY2koiKA/SXVmWqQLNoeGlVZdstNNS6mWxTiT1jfHVsFR9zEND5CEkhj3VvuCjwlxiIXEs3LvgfqZbCc0kcwGH9oyLs/Q9ga5bgKQPIInvOWHTAqf4QI3bsfs1wECg9LBDI9NF126kfEIK+DkF6bxUBVvezSSe6qhqLcpFu31M/KOkP5lSt6+3S4Kf7xNv2ukWatRIYcdmL0899pi1zJk1ysp1/50yG85l4fCP83M3pIH1NS8Q9BR3jGXuqS4rMtquA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H0dgzFeAY6C/jkXoElIH7Nb052/jkfFqUuWpreBkJ+v0N6SEYew/5jwTFh9pOPOI7b7+UcbJexZFifMXPQg9mWhbd3OBwjR0dQw4l3xOIrDzzyljz1dAMPtqofSmH4sEVKu4gijW59cC69JaFurlHHqNix5XJDun1U0zNi6vnfhRJiA6Px3R5bp9c2wZMKa69R4GFIVsONl9H3Xo8rKoo0pt9EszTi7+DyK6TClZtlGKxXXr3s0SUfNeHvy/uK9MBzGHZG6KK0e182BwxVagTVLpRcAl/bw8lxKS0rXkJySXpHnAm/NKN18lDtgjU7hEAVXCPldLOtXxJq+auUS6IA==
- Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- References: <20191022094003.9612-1-zhangxuelei4@huawei.com>
Hi Xuelei,
> Optimize the strlen implementation by using vector operations and
> loop unrooling in main loop. Compared to aarch64/strnlen.S, it
> reduces latency of cases in bench-strnlen by 11%~24% when the length
> of src is greater than 64 bytes, with gains throughout the benchmark.
Like with strcpy, this improves performance on various microarchitectures,
so this is OK.
Wilco