[libcxx-commits] [PATCH] D61170: Use std::move in numeric algorithms

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 25 20:23:44 PDT 2019


zoecarver created this revision.
zoecarver added reviewers: mclow.lists, EricWF.
Herald added subscribers: libcxx-commits, ldionne.

This patch updates algorithms in <numeric> to use `std::move` based on p0616r0 <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0616r0.pdf>. Moving values instead of copying them creates huge speed improvements (see the paper for details).


Repository:
  rCXX libc++

https://reviews.llvm.org/D61170

Files:
  include/numeric
  test/std/numerics/numeric.ops/accumulate/accumulate_op.pass.cpp
  test/std/numerics/numeric.ops/adjacent.difference/adjacent_difference_op.pass.cpp
  test/std/numerics/numeric.ops/inner.product/inner_product_comp.pass.cpp
  test/std/numerics/numeric.ops/partial.sum/partial_sum_op.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61170.196789.patch
Type: text/x-patch
Size: 8158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190426/05b0ead6/attachment.bin>


More information about the libcxx-commits mailing list