[libcxx-commits] [PATCH] D73779: The optimization for partial_sort parallel algorithm and cleanup fix

Mikhail Dvorskiy via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 31 05:14:36 PST 2020


MikeDvorskiy created this revision.
MikeDvorskiy added reviewers: ldionne, rodgert.
MikeDvorskiy created this object with visibility "All Users".
Herald added subscribers: libcxx-commits, dexonsmith, mgrang.

1. The optimization for partial_sort parallel algorithm was added.

The optimization is on "merging" steps - if {x} < {y} in "in the sense of partial sorted sub-arrays", we don't merge the sub-ranges.
The performance growth is up to 18x (4e6, int,  gcc, linux, [Intel_R__Xeon_R__Gold_6152_CPU___2.10GHz]).

2. Cleanup fix. When one of sub-ranges has not been move constructed into a raw buffer, we should not call clean up for that sub-range. Instead of store detailed info about raw buffer history, the fix does the cleanup a sub-range after each moving the sub-range back.


Repository:
  rPSTL pstl

https://reviews.llvm.org/D73779

Files:
  include/pstl/internal/algorithm_impl.h
  include/pstl/internal/parallel_backend_tbb.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73779.241702.patch
Type: text/x-patch
Size: 18095 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200131/76fd1b20/attachment-0001.bin>


More information about the libcxx-commits mailing list