Go to file
David Majnemer 8b51260274 Fix std::make_heap's worst case time complexity
std::make_heap is currently implemented by iteratively applying a
siftup-type algorithm.  Since sift-up is O(ln n), this gives
std::make_heap a worst case time complexity of O(n ln n).

The C++ standard mandates that std::make_heap make no more than O(3n)
comparisons, this makes our std::make_heap out of spec.

Fix this by introducing an implementation of __sift_down and switch
std::make_heap to create the heap using it.
This gives std::make_heap linear time complexity in the worst case.

This fixes PR20161.

llvm-svn: 213615
2014-07-22 06:07:09 +00:00
clang Fix '&' printing for template arguments in parentheses in template diffing. 2014-07-22 04:42:15 +00:00
clang-tools-extra [clang-tidy] Fix a false positive in the make_pair checker if an argument has a explicit template argument. 2014-07-21 09:40:52 +00:00
compiler-rt [MSan] Fix strncpy interceptor 2014-07-22 00:10:08 +00:00
debuginfo-tests relax testcase for LLDB output format compatibility. 2014-03-19 23:06:18 +00:00
libclc Add several missing double constant definitions 2014-07-17 22:07:35 +00:00
libcxx Fix std::make_heap's worst case time complexity 2014-07-22 06:07:09 +00:00
libcxxabi libcxxabi cmake: Use HandleLLVMOptions.cmake, don't manually add -std=c++11. 2014-07-16 23:53:37 +00:00
lld [mach-o] Add test case for armv6 (arm not thumb) hello world 2014-07-22 00:49:49 +00:00
lldb Improve LLDB's embedded C++ demangler by addressing the following two issues: 2014-07-22 00:18:52 +00:00
llvm fixed typo in comment 2014-07-22 04:57:06 +00:00
openmp CMake: remove duplicated source file from list 2014-06-02 13:09:24 +00:00
polly Update formatting with clang-format. 2014-07-20 05:28:52 +00:00