Update of /cvsroot/mplayer/main/TOOLS In directory mplayer:/var/tmp.root/cvs-serv7865 Modified Files: fastmemcpybench.c Log Message: newly allocated memory seems to point to only 1 zero filled 4k page or something so there is a near 100% cache hit rate ... not very realistic, writeing something in the source array fixes that so the benchmark scores are meaningfull now Index: fastmemcpybench.c =================================================================== RCS file: /cvsroot/mplayer/main/TOOLS/fastmemcpybench.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- fastmemcpybench.c 2 May 2001 14:48:35 -0000 1.3 +++ fastmemcpybench.c 22 Nov 2001 19:22:49 -0000 1.4 @@ -95,7 +95,7 @@ return retval; } -unsigned char arr1[ARR_SIZE],arr2[ARR_SIZE]; +unsigned char __attribute__((aligned(4096)))arr1[ARR_SIZE],arr2[ARR_SIZE]; int main( void ) { @@ -107,9 +107,12 @@ mga_init(); marr1 = &frame[3]; #else - marr1 = &arr1[3]; + marr1 = &arr1[0]; #endif - marr2 = &arr2[9]; + marr2 = &arr2[0]; + + for(i=0; i<ARR_SIZE; i++) marr1[i] = marr2[i] = i; + t=GetTimer(); v1 = read_tsc(); for(i=0;i<100;i++) memcpy(marr1,marr2,ARR_SIZE-16);
Hello, Michael! On Thu, 22 Nov 2001 20:22:51 +0100 you wrote:
Update of /cvsroot/mplayer/main/TOOLS In directory mplayer:/var/tmp.root/cvs-serv7865
Modified Files: fastmemcpybench.c Log Message: newly allocated memory seems to point to only 1 zero filled 4k page or something so there is a near 100% cache hit rate ... not very realistic, writeing something in the source array fixes that so the benchmark scores are meaningfull now
Index: fastmemcpybench.c =================================================================== RCS file: /cvsroot/mplayer/main/TOOLS/fastmemcpybench.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- fastmemcpybench.c 2 May 2001 14:48:35 -0000 1.3 +++ fastmemcpybench.c 22 Nov 2001 19:22:49 -0000 1.4 @@ -95,7 +95,7 @@ return retval; }
-unsigned char arr1[ARR_SIZE],arr2[ARR_SIZE]; +unsigned char __attribute__((aligned(4096)))arr1[ARR_SIZE],arr2[ARR_SIZE];
int main( void ) { @@ -107,9 +107,12 @@ mga_init(); marr1 = &frame[3]; #else - marr1 = &arr1[3]; + marr1 = &arr1[0]; #endif - marr2 = &arr2[9]; + marr2 = &arr2[0]; + + for(i=0; i<ARR_SIZE; i++) marr1[i] = marr2[i] = i; + t=GetTimer(); v1 = read_tsc(); for(i=0;i<100;i++) memcpy(marr1,marr2,ARR_SIZE-16);
What IS IT? This test was designed by me for testing copying of misaligned data but now they are aligned on 4096 byte boundary??? Please reverse this changes. Best regards! Nick
Hi On Friday 23 November 2001 08:55, Nick Kurshev wrote:
Hello, Michael! ...
+ for(i=0; i<ARR_SIZE; i++) marr1[i] = marr2[i] = i; + t=GetTimer(); v1 = read_tsc(); for(i=0;i<100;i++) memcpy(marr1,marr2,ARR_SIZE-16);
What IS IT? This test was designed by me for testing copying of misaligned data but now they are aligned on 4096 byte boundary???
Please reverse this changes. ok, arrays are misaligned now again, although i kept the bugfix in there, i hope u dont mind that
Best regards! Nick _______________________________________________ Mplayer-cvslog mailing list Mplayer-cvslog@mplayerhq.hu http://mplayerhq.hu/mailman/listinfo/mplayer-cvslog
Michael
participants (3)
-
Michael Niedermayer -
Michael Niedermayer -
Nick Kurshev