Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][heap] Which heap to use.
From: degski (degski_at_[hidden])
Date: 2016-09-27 13:41:22


On 27 September 2016 at 18:55, Oswin Krause <Oswin.Krause_at_[hidden]
> wrote:

> Your solution has linear complexity, while the heaps provided have
> logarithmic complexity. (insertion in the middle of a vector is a linear
> time operation).
>

 Yes, of course it has linear complexity, but the factors are much smaller.
My test-case (which is more demanding than my use-case) with a (max heap)
size of about 50'000 beats any (more intelligent) solution heads down. I'll
just conclude with a quote: “In theory, theory and practice are the same.
In practice, they are not.”

Have a good day,

degski



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net