sort_heap complexity guarantee

Marc Glisse marc.glisse@inria.fr
Mon Oct 20 20:49:00 GMT 2014


On Mon, 20 Oct 2014, François Dumont wrote:

> On 18/10/2014 09:24, Marc Glisse wrote:
>> On Mon, 6 Oct 2014, François Dumont wrote:
>>
>>>    * testsuite/25_algorithms/push_heap/complexity.cc: New.
>> 
>> This test is randomly failing in about 1% to 2% of cases.
>> 
> Is it for a particular platform ? I just run it thousands of times on my 
> Linux and never experimented any failure.

x86_64-linux-gnu, debian testing

Here is a deterministic version.

By the way, when the standard says "log" and there isn't an implicit O(), 
it usually means "log2".

-- 
Marc Glisse
-------------- next part --------------
A non-text attachment was scrubbed...
Name: complexity.cc
Type: text/x-c++src
Size: 12280 bytes
Desc: 
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20141020/5df6b634/attachment.bin>


More information about the Libstdc++ mailing list