Unsafe pre-sorted construction for sorted-vector containers
authorYedidya Feldblum <yfeldblum@fb.com>
Fri, 12 Jan 2018 05:56:07 +0000 (21:56 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 12 Jan 2018 06:07:04 +0000 (22:07 -0800)
commitfd5eeb5f4bb9ad55172e9454f726667e3c325000
tree1080a9445c70b9e9b60aacc9e0b3a944382b64ce
parentab21322d7285494f5c4609b3b549fe707a1c54e7
Unsafe pre-sorted construction for sorted-vector containers

Summary:
[Folly] Unsafe pre-sorted construction for sorted-vector containers.

If the backing container type can be constructed directly in sorted order or can be determined in advance to be in sorted order, then a special constructor can help code take advantage of this condition by avoiding an extra invocation of `std::sort`.

Reviewed By: spalamarchuk

Differential Revision: D6708379

fbshipit-source-id: 25d886b0814dc9230c6046ed1e7f199fac47754e
folly/Utility.h
folly/sorted_vector_types.h
folly/test/UtilityTest.cpp
folly/test/sorted_vector_test.cpp