[SDL] [PATCH] Re: SDL_memcpy variants used in SDL_BlitCopy

Stephane Marchesin stephane.marchesin at wanadoo.fr
Tue Sep 13 06:06:06 PDT 2005

>   About MMX copying - AMD heavily optimized.
>   http://www.cs.virginia.edu/stream/FTP/Contrib/AMD/memcpy_amd.asm
>   Intel/AMD MMX routine, using in Linux sources.
>   http://grace-ist.org/horde/chora/co.php?r=1.1&f=xine-lib/src/xine-utils/memcpy.c&Horde=56b36958409aa348f1b989d45973dd9f
>   I suppose SDL should use ideas from http://grace-ist.org
>   and use different AMD/Intel routines.
>   simple patch for unrolling SDL_memcpyMMX loop:

Actually, for the kind of memcpy that SDL does (small blocks on average), the rolled version is faster than the unrolled one. Same goes for the "heavily optimized" memcpy that you can find on the net, these are aimed at large blocks.


More information about the SDL mailing list