Date: Sun, 11 Apr 2004 13:09:44 +0200
authorSam Lantinga <slouken@libsdl.org>
Sun, 11 Apr 2004 19:52:58 +0000
changeset 8829301b429c99f
parent 881 9eb85a211abd
child 883 50f5a29c6a17
Date: Sun, 11 Apr 2004 13:09:44 +0200
From: Stephane Marchesin
Subject: [SDL] [Patch] inlining memcpy functions

I (finally) did some benchmarking of the misc mmx & sse blitting
functions, and found a little bottleneck in the memcpy ones : you get
~10% more performance on small surface blitting if you inline them.
src/video/SDL_blit.c
     1.1 --- a/src/video/SDL_blit.c	Sun Apr 11 19:49:34 2004 +0000
     1.2 +++ b/src/video/SDL_blit.c	Sun Apr 11 19:52:58 2004 +0000
     1.3 @@ -116,7 +116,7 @@
     1.4  }
     1.5  
     1.6  #ifdef MMX_ASMBLIT
     1.7 -void SDL_memcpyMMX(char* to,char* from,int len)
     1.8 +static __inline__ void SDL_memcpyMMX(char* to,char* from,int len)
     1.9  {
    1.10  	int i;
    1.11  
    1.12 @@ -132,7 +132,7 @@
    1.13  		SDL_memcpy(to, from, len&7);
    1.14  }
    1.15  
    1.16 -void SDL_memcpySSE(char* to,char* from,int len)
    1.17 +static __inline__ void SDL_memcpySSE(char* to,char* from,int len)
    1.18  {
    1.19  	int i;
    1.20