#315 memcpy performance enhancement

open
nobody
5
2011-03-23
2011-03-23
No

Right now, memcpy is implemented as a simple block of C code, looping over the bytes, loading each byte from the source pointer and storing it to the destination pointer. It would almost certainly be substantially faster if it were instead to examine the pointer type flags in the upper byte of the source pointer and then forward the request to either memcpyram2ram or memcpypgm2ram appropriately, as this would amortize the cost of checking the pointer type across the total number of bytes copied (and considering a basic RAM-to-RAM copy can be done in a single two-clock instruction, MOVFF POSTINC0, POSTINC1 or so, plus counter updates, this could be a big win!)

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks