It's more like: if (dest <= src) do what memcpy does else do basically memcpy, just backwards If you know that you don't have overlap, you can save yourself a conditional jump. Not the biggest optimization, but it can add up if you call it often, and it's easy, so you might as well take advantage of it.
just to add to this since memcpy doesnot contain any conditional jumps it doesnot result in flushing the instruction pipeline which can happen in case of memmove. -pgssgp -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ