[MN-dev] [mndiff]: r89 - trunk/noe/test.c
michael
subversion at mplayerhq.hu
Tue Oct 21 15:33:44 CEST 2008
Author: michael
Date: Tue Oct 21 15:33:43 2008
New Revision: 89
Log:
add benchmarking code
Modified:
trunk/noe/test.c
Modified: trunk/noe/test.c
==============================================================================
--- trunk/noe/test.c (original)
+++ trunk/noe/test.c Tue Oct 21 15:33:43 2008
@@ -285,6 +285,31 @@ STOP_TIMER}
}
}
}
+
+ //Encoding is implemented as erasure decoding thus we dont need to
+ //benchmark them seperately
+ printf("\n\nencoding / erasure decoding benchmarking\n"); fflush(stdout);
+ for(codeBits=8; codeBits<=SHIFT; codeBits++){
+ decimate= SHIFT - codeBits;
+ for(i=1; i<(SIZE/2)>>decimate; i+=i){
+ int n= (SIZE - 1)>>decimate;
+ int k= n - i;
+ GFF4Element code[n];
+ GFF4Element parityLocator[i+2];
+ int pass;
+ uint64_t end, start= rdtsc();
+
+ parityLocator[0]= 0;
+ for(pass=10; pass; pass--){
+ for(j=0; j<k; j++)
+ code[j]= (pass*j+123) & MASK;
+
+ EXT(rsEncode)(code, parityLocator, i, codeBits);
+ }
+ end= rdtsc();
+ printf("%Ld cpu cycles for (%d, %d) code, %f bytes/cycle\n", (end-start)/10, n, k, 20*n/(float)(end-start)); fflush(stdout);
+ }
+ }
#if 0
{
uint8_t buffer[20000];
More information about the Mndiff-dev
mailing list