Messages in this thread | | | From | Geert Uytterhoeven <> | Date | Mon, 9 Jan 2023 20:59:32 +0100 | Subject | Re: Dhrystone -- userland version |
| |
Hi Pavel,
On Mon, Jan 9, 2023 at 8:51 PM Pavel Machek <pavel@ucw.cz> wrote: > > > count=1666675 us50=20178 us250=99913 diff=79735 cpu_MHz=4180.536 tsc50=42614718 tsc250=211016124 diff=101 rdtsc_MHz=2112.014 > > > > > > It's also what's used by sbc-bench to verify that CPU vendors are not > > > cheating in the embedded world. It's very simple, and not arch-dependent > > > nor compiler-dependent (at least as long as you don't build at -O0 :-)). > > > > Seeing the rdtsc stuff, I was a bit skeptical, but it seems to work > > fine on arm32 and rv64. > > > > Unfortunately you forgot to add a LICENSE file ;-) > > > > Alternatively, I can use the C version of BogoMIPS. Which has its > > own merits and reputation. > > I'd expect BogoMIPS to be _much_ worse than Dhrystone. If all the > cores are same, it should be good enough, but...
Both give different results when run on little vs. big cores. That's why my in-kernel version prints the CPU number, and supports running multiple benchmarks in parallel.
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
| |