Files
clang-p2996/libc/utils/benchmarks/configuration_small.json
Guillaume Chatelet aba80d0734 [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
2020-01-24 11:30:58 +01:00

25 lines
457 B
JSON

{
"Options":{
"MinDuration":0.001,
"MaxDuration":1,
"InitialIterations":100,
"MaxIterations":10000000,
"MinSamples":4,
"MaxSamples":1000,
"Epsilon":0.01,
"ScalingFactor":1.4
},
"Configuration":{
"Runs":10,
"BufferSize":8192,
"Size":{
"From":0,
"To":1024,
"Step":1
},
"AddressAlignment":1,
"MemsetValue":0,
"MemcmpMismatchAt":0
}
}