Re: Dhrystone -- userland version

From: Geert Uytterhoeven
Date: Mon Jan 09 2023 - 14:57:52 EST


Hi Willy,

On Mon, Jan 9, 2023 at 3:31 PM Willy Tarreau <w@xxxxxx> wrote:
> Then maybe you'd rather use this:
>
> https://github.com/wtarreau/mhz

> 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 :-)).

Gcc 4.1.2 (still the userspace compiler on a few of my old systems)
doesn't like the aligned() attribute on functions.
In glibc 2.3, LLONG_MAX is defined conditionally on __USE_ISOC99.

Apart from that, the result is fairly accurate. Nice job!

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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