[FFmpeg-devel] [PATCH] Macros to copy small, possibly unaligned, values

Reimar Döffinger Reimar.Doeffinger
Tue Jun 2 23:48:21 CEST 2009


On Tue, Jun 02, 2009 at 03:08:13PM -0400, Jeff Downs wrote:
> On Tue, 2 Jun 2009, Reimar D?ffinger wrote:
> > Since I benchmarked that a lot on x86 back then, the obvious question
> > is if there is any reason at all to avoid using memcpy...
> 
> Mans did some tests on a number of architectures and suggested it would be 
> best to not just use memcpy universally for small, constant-sized amounts.  
> Maybe he can post the specifics of some of his testing or summarize his
> findings.

It might be a good idea to try static inline functions instead of macros,
since that allows you to properly use restrict on the pointers - otherwise
memcpy will have at least a theoretical advantage.



More information about the ffmpeg-devel mailing list