DIVYA added a comment.

Link to algorithm.bench.cpp benchmark 
https://github.com/hiraditya/std-benchmark/blob/master/cxx/algorithm.bench.cpp



================
Comment at: include/algorithm:4208
+
+  // Threshold(or depth limit) for introsort is taken to be 2*log2(size)
+  typedef typename iterator_traits<_RandomAccessIterator>::difference_type 
difference_type;
----------------
bcraig wrote:
> This comment says basically the same thing as the code.  The comment would be 
> more useful if it said why 2*log2(size) is used.
We tested the code with depth limit from log2(size) to 4*log2(size).It was 
giving good performance around 2*log2(size).So the depth limit was fixed a this 
value.


https://reviews.llvm.org/D36423



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to