[PATCH] D42357: Under limitation of allocated buffer, inplace_merge() does NOT take usage of partial allocated buffer but applies native rotate directly.

2018-01-24 Thread WeiChungChang via Phabricator via cfe-commits
WeiChungChang added a comment. Here gives the comparison after fix. F5783231: o1.png It is better now but still slower; also, one could notice the standard variance (each round the execution time is unstable even the input is uniform) The problem will be sho

[PATCH] D42357: Under limitation of allocated buffer, inplace_merge() does NOT take usage of partial allocated buffer but applies native rotate directly.

2018-01-23 Thread WeiChungChang via Phabricator via cfe-commits
WeiChungChang added a comment. Here gives the comparison between GCC & LLVM's std c++ library. It is shown that libc++ soon suffers from rotate speed under limited allocated buffer and slower than GCC's corresponding version. Both LLVM & GCC run the same test program. F5782010: 0124.png

[PATCH] D42357: Under limitation of allocated buffer, inplace_merge() does NOT take usage of partial allocated buffer but applies native rotate directly.

2018-01-23 Thread WeiChungChang via Phabricator via cfe-commits
WeiChungChang added a comment. Dear mclow: Thanks a lot for your kindly reply! I would like to briefly describe the purpose of this fix here. **`This patch is in a series of 3 aimed targets.`** I could explain them item-by-item in detail with experiment. **//However, I mainly focus on algorithm

[PATCH] D42357: Under limitation of allocated buffer, inplace_merge does NOT take usge of partial allocated buffer but uses native rotate directly. It makes the performace far behind from correspondin

2018-01-21 Thread WeiChungChang via Phabricator via cfe-commits
WeiChungChang created this revision. Herald added a subscriber: cfe-commits. ...buffer firstly. Experiment shows 28.35% & 25.06% speedup for merging two equal size sorted integers for -O3 & no -O3 cases. Repository: rCXX libc++ https://reviews.llvm.org/D42357 Files: include/algorithm In