Change benchmarking code so it returns comparable values.
Originally committed as revision 14434 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -87,15 +87,12 @@ void main(void)
|
|||||||
AVRandomState state;
|
AVRandomState state;
|
||||||
|
|
||||||
av_init_random(0xdeadbeef, &state);
|
av_init_random(0xdeadbeef, &state);
|
||||||
for (j = 0; j < 100; j++) {
|
for (j = 0; j < 10000; j++) {
|
||||||
START_TIMER;
|
START_TIMER
|
||||||
x+= av_random(&state);
|
for (i = 0; i < 624; i++) {
|
||||||
STOP_TIMER("first call to av_random");
|
|
||||||
for (i = 1; i < AV_RANDOM_N; i++) {
|
|
||||||
START_TIMER;
|
|
||||||
x+= av_random(&state);
|
x+= av_random(&state);
|
||||||
STOP_TIMER("AV_RANDOM_N calls of av_random");
|
|
||||||
}
|
}
|
||||||
|
STOP_TIMER("624 calls of av_random");
|
||||||
}
|
}
|
||||||
av_log(NULL, AV_LOG_ERROR, "final value:%X\n", x);
|
av_log(NULL, AV_LOG_ERROR, "final value:%X\n", x);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user