2016-01-29 11:47:40 +01:00
|
|
|
#include "benchmark/benchmark_api.h"
|
2020-01-22 13:31:52 +01:00
|
|
|
#include <ctime>
|
2016-01-29 11:47:40 +01:00
|
|
|
#include "osdcore.h"
|
|
|
|
#include "osdcomm.h"
|
|
|
|
#define MAME_NOASM 1
|
|
|
|
osd_ticks_t osd_ticks(void)
|
|
|
|
{
|
|
|
|
// use the standard library clock function
|
|
|
|
return clock();
|
|
|
|
}
|
|
|
|
#include "eminline.h"
|
|
|
|
|
|
|
|
static void BM_count_leading_zeros_noasm(benchmark::State& state) {
|
2016-10-22 14:32:36 +02:00
|
|
|
uint32_t cnt = 0x332533;
|
2016-01-29 11:47:40 +01:00
|
|
|
while (state.KeepRunning()) {
|
2021-06-22 14:42:29 +02:00
|
|
|
(void)count_leading_zeros_32(cnt);
|
2016-01-29 11:47:40 +01:00
|
|
|
cnt++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Register the function as a benchmark
|
|
|
|
BENCHMARK(BM_count_leading_zeros_noasm);
|