lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #7060] Patch to optionally inline ip checksum


From: Bill Auerbach
Subject: [lwip-devel] [patch #7060] Patch to optionally inline ip checksum
Date: Tue, 16 Mar 2010 17:14:58 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)

Follow-up Comment #13, patch #7060 (project lwip):

Take the attached C code and paste it at the bottom of IP.c.  Put a break
point on the for loop body and call the function inlineHdrChecksumBenchmark in
your code.  I called this after lwIP is initialized but with only a timer
running.  A #define needs to be filled in with a function name that gets an mS
running timer from the system.  Faster systems need to bump up the loop
count.

It duplicates the pertinent parts of IP header checksumming for inlining and
not inlining.  In the not inlining case, it uses the current lwipopts.h
settings for checksumming.  Because code and data will be cached on systems
that can cache, this shows just the difference of executed code (processing
cycles saved).

a) On a 100MhZ NIOS II with the lwIP standard checksum (algorithm 1) it's
2.22 times faster.  (1200mS and 538mS for 500,000 loops).  This is little
endian and alignment matters.

b) On a 533MhZ PowerPC with the lwIP standard checksum (algorithm 1) it's
3.63 times faster.  (1265mS and 348mS for 5,000,000 loops).  This is big
endian and alignment matters.

c) On a 533MhZ PowerPC with a highly optimized assembly checksum routine it's
2.26 times faster (788mS and 348mS for 5,000,000 loops).


(file #19960)
    _______________________________________________________

Additional Item Attachment:

File name: hdr_chksum_benchmark.c         Size:3 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?7060>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]