[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:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 |
URL:
<http://savannah.nongnu.org/patch/?5920>
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
_______________________________________________________
Details:
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
come.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Dienstag 08.05.2007 um 19:13 Name: memcpy_define.patch Size: 14kB
By: goldsimon
<http://savannah.nongnu.org/patch/download.php?file_id=12718>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?5920>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
- [lwip-devel] [patch #5920] Create define to override C-library memcpy,
Simon Goldschmidt <=