From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alessandro Rubini Date: Thu, 8 Oct 2009 13:29:51 +0200 Subject: [U-Boot] [PATCH V2 0/3] make memcpy and memset faster Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de I've added 32-bit lcd to the Nomadik (not submitted yet), and I found the scroll to be very slow, as the screen is big. Instead of activating the "if 0" stanza for 32-bit scroll in lcd.c, I'd better have a faster memcpy/memset globally. So this patch set adds ulong-wide memcpy and memset, then removes the "#if 0" part in the scroll function. For me scrolling is 4 times faster on a 32 bit system. V2: I incorporated most of the comments, but I didn't change the for loops to help the compiler optimizing it, since nowadays gcc is already doing the loops his own way irrespective of what i write. Similarly, I'm not interested in "4 bytes at a time, then 1 at a time" as it's quite a corner case. If such optimizations are really useful, then we'd better have hand-crafted assembly for each arch, possibly lifted from glibc. Alessandro Rubini (3): memcpy: copy one word at a time if possible memset: fill one word at a time if possible lcd: remove '#if 0' 32-bit scroll, now memcpy does it common/lcd.c | 21 --------------------- lib_generic/string.c | 34 +++++++++++++++++++++++++++++----- 2 files changed, 29 insertions(+), 26 deletions(-)