[Top][All Lists]

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

[lwip-devel] [patch #5920] Create define to override C-library memcpy

From: Simon Goldschmidt
Subject: [lwip-devel] [patch #5920] Create define to override C-library memcpy
Date: Tue, 08 May 2007 19:13:33 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20070309 Firefox/


                 Summary: Create define to override C-library memcpy
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: Dienstag 08.05.2007 um 19:13
                Category: None
                Priority: 5 - Normal
                  Status: In Progress
                 Privacy: Public
             Assigned to: goldsimon
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any



In the attached patch, I have created 2 defines (MEMCPY() and SMEMCPY()) to
override the use of C-library memcpy() and instead use a faster function.

SMEMCPY() is used for small sizes as some compilers (mainly gcc?) can inline
them. So you wouldn't normally define SMEMCPY but only define MEMCPY to some
faster method (e.g. unrolling some loops and using more registers...). This
helped _me_ speed up the stack (on an ARM & on NIOS-II) so I think this
should also help others.

I replaced all occurences of memcpy() in the stack by what I think is best
(SMEMCPY vs. MEMCPY) and will check in this in some days if no objections


File Attachments:

Date: Dienstag 08.05.2007 um 19:13  Name: memcpy_define.patch  Size: 14kB  
By: goldsimon



Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

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