From patchwork Mon Jan 12 15:14:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 4624 Received: (qmail 26653 invoked by alias); 12 Jan 2015 15:14:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 26643 invoked by uid 89); 12 Jan 2015 15:14:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com From: "Wilco Dijkstra" To: Subject: [PATCH] Improve bcopy performance Date: Mon, 12 Jan 2015 15:14:10 -0000 Message-ID: <001d01d02e7a$6aeeff40$40ccfdc0$@com> MIME-Version: 1.0 X-MC-Unique: 115011215141304001 Rather than using a C implementation of memmove, directly call memmove, which typically has a much faster optimized implementation. ChangeLog: 2015-01-12 Wilco Dijkstra wdijkstr@arm.com * string/bcopy.c (bcopy): Call memmove for performance. --- string/bcopy.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/string/bcopy.c b/string/bcopy.c index f497b5d..b26f347 100644 --- a/string/bcopy.c +++ b/string/bcopy.c @@ -15,14 +15,11 @@ License along with the GNU C Library; if not, see . */ +#include #include -#define memmove bcopy -#define rettype void -#define RETURN(s) return -#define a1 src -#define a1const const -#define a2 dest -#define a2const - -#include +void +bcopy (const void *src, void *dest, size_t len) +{ + memmove (dest, src, len); +}