Thank you for including explicit usage cmdline :)

Results with current slice_by_8 code

GL_CRC_SLICE_BY_8 not set
$ gltests/bench-crc 1000000
real   7.502692
user   7.503
sys    0.000
$ gltests/bench-crc 1000000
real   7.481411
user   7.481
sys    0.000
$ gltests/bench-crc 1000000
real   7.525393
user   7.525
sys    0.000

GL_CRC_SLICE_BY_8 set
$ gltests/bench-crc 1000000
real   1.777945
user   1.778
sys    0.000
$ gltests/bench-crc 1000000
real   1.777223
user   1.777
sys    0.000
$ gltests/bench-crc 1000000
real   1.783793
user   1.784
sys    0.000

$ uname -a
Linux localhost 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29
23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ lscpu |grep "Model name"
Model name:                         AMD Ryzen 5 5600 6-Core Processor


On Wed, 16 Oct 2024 at 23:20, Bruno Haible <br...@clisp.org> wrote:

> In preparation of Sam's improvements to the 'crc' module, it will be useful
> to have a benchmark program, so that we can measure the speedups on various
> CPUs.
>
> I'm committing this patch. To use it:
>   $ ./gnulib-tool --create-testdir --dir=../testdir --single-configure
> --symlink crc
>   $ cd ../testdir
>   $ ./configure
>   $ make
>   $ gltests/bench-crc 1000000
>   real   8.253921
>   user   8.253
>   sys    0.000
>
>
> 2024-10-16  Bruno Haible  <br...@clisp.org>
>
>         crc tests: Add a benchmark program.
>         * tests/macros.h (randomb): New declaration.
>         * tests/randomb.c: New file.
>         * tests/bench-crc.c: New file.
>         * modules/crc-tests (Files): Add them. Add tests/macros.h,
>         tests/bench.h.
>         (Depends-on): Add getrusage, gettimeofday.
>         (Makefile.am): Arrange to compile bench-crc.
>
>

Reply via email to