Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
fonts/ | H | 25-Apr-2025 | - | |||
texts/ | H | 25-Apr-2025 | - | 35,240 | 34,348 | |
README.md | H A D | 25-Apr-2025 | 1.4 KiB | 55 | 39 | |
benchmark-font.cc | H A D | 25-Apr-2025 | 8.2 KiB | 318 | 275 | |
benchmark-map.cc | H A D | 25-Apr-2025 | 2.6 KiB | 104 | 75 | |
benchmark-ot.cc | H A D | 25-Apr-2025 | 2 KiB | 40 | 33 | |
benchmark-set.cc | H A D | 25-Apr-2025 | 3.9 KiB | 145 | 113 | |
benchmark-shape.cc | H A D | 25-Apr-2025 | 3.9 KiB | 166 | 137 | |
benchmark-subset.cc | H A D | 25-Apr-2025 | 7.8 KiB | 277 | 228 | |
hb-benchmark.hh | H A D | 25-Apr-2025 | 2.1 KiB | 77 | 38 | |
meson.build | H A D | 25-Apr-2025 | 706 | 25 | 22 |
README.md
1# Building and Running 2 3Benchmarks are implemented using [Google Benchmark](https://github.com/google/benchmark). 4 5To build the benchmarks in this directory you need to set the benchmark 6option while configuring the build with meson: 7 8``` 9meson build -Dbenchmark=enabled --buildtype=release 10``` 11or: 12``` 13meson build -Dbenchmark=enabled --buildtype=debugoptimized 14``` 15 16 17Then build a specific benchmark binaries with ninja: 18``` 19ninja -Cbuild perf/benchmark-set 20``` 21or just build the whole project: 22``` 23ninja -Cbuild 24``` 25 26Finally, to run one of the benchmarks: 27 28``` 29./build/perf/benchmark-set 30``` 31 32It's possible to filter the benchmarks being run and customize the output 33via flags to the benchmark binary. See the 34[Google Benchmark User Guide](https://github.com/google/benchmark/blob/main/docs/user_guide.md#user-guide) for more details. 35 36# Profiling 37 38Configure the build to include debug information for profiling: 39 40``` 41CXXFLAGS="-fno-omit-frame-pointer" meson --reconfigure build -Dbenchmark=enabled --buildtype=debug 42ninja -Cbuild 43``` 44 45Then run the benchmark with perf: 46 47``` 48perf record -g build/perf/benchmark-subset --benchmark_filter="BM_subset_codepoints/subset_notocjk/100000" --benchmark_repetitions=5 49``` 50You 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. 51 52Finally view the profile with: 53 54perf report 55