bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mbiter, mbuiter, mbswidth: Add benchmarks


From: Bruno Haible
Subject: mbiter, mbuiter, mbswidth: Add benchmarks
Date: Tue, 11 Jul 2023 22:33:12 +0200

These patches add benchmarks for the mbiter, mbuiter, mbswidth modules.

To use them:
$ ./gnulib-tool --create-testdir --dir=../testdir1 --single-configure --symlink 
\
                mbswidth-bench-tests mbiter-bench-tests mbuiter-bench-tests
$ cd ../testdir1
$ ./configure
$ make
$ valgrind --tool=callgrind gltests/bench-mbuiter abcdefghij 10000
$ kcachegrind callgrind.out.*
then switch to "Callee map".
(See https://gitlab.com/ghwiki/gnow-how/-/wikis/Profiling for more details.)

If you want to focus on the performance in UTF-8 locales, use
$ gltests/bench-mbuiter behi 10000
Or, if you want to focus on the performance in the C locale, use
$ gltests/bench-mbuiter acf 10000


2023-07-11  Bruno Haible  <bruno@clisp.org>

        mbswidth: Add a benchmark.
        * tests/bench-mbswidth.c: New file, based on tests/bench-mbiter.c.
        * modules/mbswidth-bench-tests: New file.

        mbuiter: Add a benchmark.
        * tests/bench-mbuiter.c: New file, based on tests/bench-mbiter.c.
        * modules/mbuiter-bench-tests: New file.

        mbiter: Add a benchmark.
        * tests/bench-mbiter.c: New file.
        * tests/bench-multibyte.h: New file.
        * modules/mbiter-bench-tests: New file.

Attachment: 0001-mbiter-Add-a-benchmark.patch
Description: Text Data

Attachment: 0002-mbuiter-Add-a-benchmark.patch
Description: Text Data

Attachment: 0003-mbswidth-Add-a-benchmark.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]