[U-Boot] [PATCH v3] crc32: Impl. linux optimized crc32()

Wolfgang Denk wd at denx.de
Wed Dec 2 23:42:56 CET 2009


Dear Joakim Tjernlund,

In message <1258634656-21262-1-git-send-email-Joakim.Tjernlund at transmode.se> you wrote:
> Ported over the more efficient linux crc32() function.
> A quick comparsion on ppc:
> After changing the old crc32 to do 4 bytes in the
> inner loop to be able to compare with new version one can note:
> - old inner loop has 61 insn, new has 19 insn.
> - new crc32 does one 32 bit load of data to crc while
>   the old does four 8 bits loads.
> - size is bit bigger for the new crc32:
>   1392(old) 1416(new) of text. The is because the new version
>   shares code with crc32_no_comp() instead of duplicating code.
> - about 33% faster on ppc:
>   New > crc 0 0xfffffff -> 39 secs
>   Old > crc 0 0xfffffff -> 60 secs
> 
> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> ---
> 
>  V3: squashed "crc32: Make crc32 build on non Linux too"
>      into this patch to form one clean patch.
> 
>  I think this patch is ready for general use.
> 
>  lib_generic/crc32.c |  200 ++++++++++++++++++++++++++++----------------------
>  1 files changed, 112 insertions(+), 88 deletions(-)

Applied to "next", thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There are no data that cannot be plotted on a straight  line  if  the
axis are chosen correctly.


More information about the U-Boot mailing list