[PATCH] D64082: [MemFunctions] Add microbenchmarks for memory functions.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 3 05:08:48 PDT 2019
lebedev.ri added inline comments.
================
Comment at: MicroBenchmarks/MemFunctions/main.cpp:29
+void BM_MemCmp(benchmark::State& state) {
+ constexpr const size_t kNumElements = 4096 / kSize;
+
----------------
Magical constant
I'm guessing that by `4096` you limit the maximal size of `p` and `q` buffers,
implying that they should fit into L1 cache?
Do you want to use the actual L1 size instead?
Otherwise,
```
static constexpr size_t kMaxBufSizeBytes = 4096;
constexpr size_t kNumElements = kMaxBufSizeBytes / kSize;
```
Repository:
rT test-suite
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64082/new/
https://reviews.llvm.org/D64082
More information about the llvm-commits
mailing list