Closed tangentsoft closed 3 years ago
The problem is that bench_t in common/benchmark.h is typedefed as unsigned long which is 32 bits on 32 bit platforms, and now() returns ts.tv_sec * 1e9 + ts.tv_nsec, which overflows in 32 bits.
Changing bench_t to unsigned long long gives me correct results on Rasbian (Stretch)
Thanks @luksan
Should be fixed now.
I am trying to spend a bit of time on this code base again and fixes like that are super helpful!
I've tried several of the benchmarks, and they all give the same bogus result:
The programs exit with a zero exit code.
I've also tried it on Debian 9 (Stretch), which is the base OS for Raspbian Stretch, and the benchmark runs properly there, so I assume there is some ARM portability problem here.
Can you please try running this benchmark on a Raspberry Pi and fix up the portability problems that prevent it from giving useful results? Thanks.