OSDN Git Service

Modifications to the algorithm sort benchmark
authorMinJae Hwang <minjaehwang@google.com>
Mon, 6 Jul 2020 22:29:38 +0000 (18:29 -0400)
committerMartijn Vels <mvels@google.com>
Mon, 6 Jul 2020 22:30:02 +0000 (18:30 -0400)
commit8421364282646f5f398d76ffce13a37fe541f015
treeac70fec16b7adb7b6b298f52e2f85a0b8b125a0f
parent95a28df5c458cd751355fc84263762c330474254
Modifications to the algorithm sort benchmark

Summary:
Modifies the algorithm sort bench:
- shows sorting time per element, instead of sorting time per array.
This would make comparison between different sizes of arrays easier.
- adds std::pair benchmark cases.
- uses a large number of arrays to benchmark, instead of repeatedly sorting the same array.
* sorting the same array again and again would not show actual sorting performance over randomized data sets.

Reviewers: EricWF, #libc, mvels

Reviewed By: EricWF, #libc, mvels

Subscribers: mgrang, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D81770
libcxx/benchmarks/algorithms.bench.cpp