Page MenuHomePhabricator

Add relational benchmark against a string constant.
ClosedPublic

Authored by sbenza on Mar 18 2019, 2:03 PM.

Details

Summary

Add relational benchmark against a string constant.
These can potentially trigger inlining of the operations. We want to
benchmark that.

Diff Detail

Repository
rCXX libc++

Event Timeline

sbenza created this revision.Mar 18 2019, 2:03 PM
EricWF accepted this revision.Mar 21 2019, 1:50 AM
EricWF added inline comments.
libcxx/benchmarks/string.bench.cpp
272 ↗(On Diff #191171)

We want this switch to be optimized away, right?

This revision is now accepted and ready to land.Mar 21 2019, 1:50 AM
sbenza marked an inline comment as done.Mar 21 2019, 8:12 AM
sbenza added inline comments.
libcxx/benchmarks/string.bench.cpp
272 ↗(On Diff #191171)

Rel() returns a constexpr value, so the switch is optimized away.

This revision was automatically updated to reflect the committed changes.