[all-commits] [llvm/llvm-project] aba80d: [llvm-libc] Add memory function benchmarks
Guillaume Chatelet via All-commits
all-commits at lists.llvm.org
Fri Jan 24 02:31:20 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: aba80d0734d1bc876395ad048462534618d25ca8
https://github.com/llvm/llvm-project/commit/aba80d0734d1bc876395ad048462534618d25ca8
Author: Guillaume Chatelet <gchatelet at google.com>
Date: 2020-01-24 (Fri, 24 Jan 2020)
Changed paths:
M libc/utils/CMakeLists.txt
M libc/utils/HdrGen/CMakeLists.txt
A libc/utils/benchmarks/CMakeLists.txt
A libc/utils/benchmarks/JSON.cpp
A libc/utils/benchmarks/JSON.h
A libc/utils/benchmarks/JSONTest.cpp
A libc/utils/benchmarks/LibcBenchmark.cpp
A libc/utils/benchmarks/LibcBenchmark.h
A libc/utils/benchmarks/LibcBenchmarkTest.cpp
A libc/utils/benchmarks/LibcMemoryBenchmark.cpp
A libc/utils/benchmarks/LibcMemoryBenchmark.h
A libc/utils/benchmarks/LibcMemoryBenchmarkMain.cpp
A libc/utils/benchmarks/LibcMemoryBenchmarkMain.h
A libc/utils/benchmarks/LibcMemoryBenchmarkTest.cpp
A libc/utils/benchmarks/Memcmp.cpp
A libc/utils/benchmarks/Memcpy.cpp
A libc/utils/benchmarks/Memset.cpp
A libc/utils/benchmarks/RATIONALE.md
A libc/utils/benchmarks/README.md
A libc/utils/benchmarks/configuration_big.json
A libc/utils/benchmarks/configuration_small.json
A libc/utils/benchmarks/render.py3
Log Message:
-----------
[llvm-libc] Add memory function benchmarks
Summary:
This patch adds a benchmarking infrastructure for llvm-libc memory functions.
In a nutshell, the code can benchmark small and large buffers for the memcpy, memset and memcmp functions.
It also produces graphs of size vs latency by running targets of the form `render-libc-{memcpy|memset|memcmp}-benchmark-{small|big}`.
The configurations are provided as JSON files and the benchmark also produces a JSON file.
This file is then parsed and rendered as a PNG file via the `render.py` script (make sure to run `pip3 install matplotlib scipy numpy`).
The script can take several JSON files as input and will superimpose the curves if they are from the same host.
TODO:
- The code benchmarks whatever is available on the host but should be configured to benchmark the -to be added- llvm-libc memory functions.
- Add a README file with instructions and rationale.
- Produce scores to track the performance of the functions over time to allow for regression detection.
Reviewers: sivachandra, ckennelly
Subscribers: mgorny, MaskRay, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D72516
More information about the All-commits
mailing list