[PATCH] D52697: Bug 39129: Speeding up partition_point/lower_bound/upper_bound/ by using unsigned division by 2 when possible.

Denis Yaroshevskiy via Phabricator reviews at reviews.llvm.org
Sun Sep 30 09:57:25 PDT 2018


dyaroshev updated this revision to Diff 167651.
dyaroshev retitled this revision from "Bug 39129: Speeding up partition_point/lower_bound/upper_bound by using unsigned difference_type when possible." to "Bug 39129: Speeding up partition_point/lower_bound/upper_bound/ by using unsigned division by 2 when possible.".
dyaroshev added a comment.
Herald added a subscriber: christof.

- Addressed review comments.
- Changed (I measured - the result performs identically) cast to __half_unsigned function
- Added similar optimization and benchmarks to equal_range.

(updated measurements can be found in the bug description).


https://reviews.llvm.org/D52697

Files:
  benchmarks/algorithms.bench.cpp
  include/algorithm
  test/libcxx/algorithms/half_as_unsigned.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52697.167651.patch
Type: text/x-patch
Size: 11843 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20180930/1fe4fc44/attachment-0001.bin>


More information about the libcxx-commits mailing list