@ -631,34 +631,32 @@ static inline double avg_cycles_per_call(const CheckasmPerf *const p)
static void print_benchs ( CheckasmFunc * f )
static void print_benchs ( CheckasmFunc * f )
{
{
if ( f ) {
if ( f ) {
CheckasmFuncVersion * v = & f - > versions ;
const CheckasmPerf * p = & v - > perf ;
const double baseline = avg_cycles_per_call ( p ) ;
double decicycles ;
print_benchs ( f - > child [ 0 ] ) ;
print_benchs ( f - > child [ 0 ] ) ;
/* Only print functions with at least one assembly version */
do {
if ( f - > versions . cpu | | f - > versions . next ) {
if ( p - > iterations ) {
CheckasmFuncVersion * v = & f - > versions ;
p = & v - > perf ;
const CheckasmPerf * p = & v - > perf ;
decicycles = avg_cycles_per_call ( p ) ;
const double baseline = avg_cycles_per_call ( p ) ;
if ( state . csv | | state . tsv ) {
double decicycles ;
const char sep = state . csv ? ' , ' : ' \t ' ;
do {
printf ( " %s%c%s%c%.1f \n " , f - > name , sep ,
if ( p - > iterations ) {
cpu_suffix ( v - > cpu ) , sep ,
p = & v - > perf ;
decicycles / 10.0 ) ;
decicycles = avg_cycles_per_call ( p ) ;
} else {
if ( state . csv | | state . tsv ) {
const int pad_length = 10 + 50 -
const char sep = state . csv ? ' , ' : ' \t ' ;
printf ( " %s_%s: " , f - > name , cpu_suffix ( v - > cpu ) ) ;
printf ( " %s%c%s%c%.1f \n " , f - > name , sep ,
const double ratio = decicycles ?
cpu_suffix ( v - > cpu ) , sep ,
baseline / decicycles : 0.0 ;
decicycles / 10.0 ) ;
printf ( " %*.1f (%5.2fx) \n " , FFMAX ( pad_length , 0 ) ,
} else {
decicycles / 10.0 , ratio ) ;
const int pad_length = 10 + 50 -
printf ( " %s_%s: " , f - > name , cpu_suffix ( v - > cpu ) ) ;
const double ratio = decicycles ?
baseline / decicycles : 0.0 ;
printf ( " %*.1f (%5.2fx) \n " , FFMAX ( pad_length , 0 ) ,
decicycles / 10.0 , ratio ) ;
}
}
}
} while ( ( v = v - > next ) ) ;
}
}
} while ( ( v = v - > next ) ) ;
print_benchs ( f - > child [ 1 ] ) ;
print_benchs ( f - > child [ 1 ] ) ;
}
}