From: Wolfgang Denk Date: Wed, 02 Dec 2009 23:42:56 +0100 Subject: [U-Boot] [PATCH v3] crc32: Impl. linux optimized crc32() In-Reply-To: <1258634656-21262-1-git-send-email-Joakim.Tjernlund@transmode.se> References: <20091118224556.C1A083F6C2@gemini.denx.de> <1258634656-21262-1-git-send-email-Joakim.Tjernlund@transmode.se> Message-ID: <20091202224256.BCA164C025@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Joakim Tjernlund, In message <1258634656-21262-1-git-send-email-Joakim.Tjernlund@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 > --- > > 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.