• Show log

    Commit

  • Hash : 0ff5d36c
    Author : Behdad Esfahbod
    Date : 2022-05-17T16:34:52

    [perf/benchmark-ot] Fix benchmark
    
    Part of https://github.com/harfbuzz/harfbuzz/issues/3591
    
    Ouch!
    
    These are the current numbers:
    
    ------------------------------------------------------------------------------------------------
    Benchmark                                                      Time             CPU   Iterations
    ------------------------------------------------------------------------------------------------
    BM_hb_ot_tags_from_script_and_language/COMMON abcd_XY       78.0 ns         77.7 ns      8917912
    BM_hb_ot_tags_from_script_and_language/COMMON zh_CN         44.9 ns         44.8 ns     15475318
    BM_hb_ot_tags_from_script_and_language/COMMON en_US         17.6 ns         17.5 ns     39812340
    BM_hb_ot_tags_from_script_and_language/LATIN en_US          18.2 ns         18.1 ns     38356204
    BM_hb_ot_tags_from_script_and_language/COMMON none          4.76 ns         4.74 ns    148746131
    BM_hb_ot_tags_from_script_and_language/LATIN none           4.73 ns         4.71 ns    148421349
    

  • Properties

  • Git HTTP https://git.kmx.io/kc3-lang/harfbuzz.git
    Git SSH git@git.kmx.io:kc3-lang/harfbuzz.git
    Public access ? public
    Description

    HarfBuzz text shaping engine

    Users
    thodg_m kc3_lang_org thodg_w www_kmx_io thodg_l thodg
    Tags

  • README.md

  • Building and Running

    Benchmarks are implemented using Google Benchmark.

    To build the benchmarks in this directory you need to set the benchmark option while configuring the build with meson:

    meson configure build -Dbenchmark=enabled --buildtype=release

    Then build the benchmark binaries with ninja:

    ninja -Cbuild perf/benchmark-set

    Finally, to run one of the benchmarks:

    ./build/perf/benchmark-set

    It’s possible to filter the benchmarks being run and customize the output via flags to the benchmark binary. See the Google Benchmark User Guide for more details.

    Profiling

    Configure the build to include debug information for profiling:

    CXXFLAGS="-fno-omit-frame-pointer" meson --reconfigure build -Dbenchmark=enabled --buildtype=debug
    ninja -Cbuild

    Then run the benchmark with perf:

    perf record -g -o ~/tmp/profiles/subset.prof ./build/perf/benchmark-subset --benchmark_filter="BM_subset_codepoints/subset_notocjk/100000" --benchmark_repetitions=5

    You probably want to filter to a specific benchmark of interest and set the number of repititions high enough to get a good sampling of profile data.

    Finally view the profile with:

    perf report -i ~/tmp/profiles/subset.prof