RE: Problem with a list of times
Posted by Luigi Ballabio-2 on Oct 02, 2002; 2:44am
URL: http://quantlib.414.s1.nabble.com/Problem-with-a-list-of-times-tp2221p2227.html
At 10:03 AM 10/2/02 +0200, Perissin Francesco wrote:
>Regarding the sorting issue, I was using the sort method of the list object,
>as in your first example. The deque class works much better, the sorting is
>practically instantaneous (I am not a programmer and this sounds quite
>strange to me, I'd be tempted to say that the sort algorithm of the list has
>been implemented very badly!!).
Ciao,
it's not that strange if you think that a std::deque has random
access to its elements, while a std::list only has sequential access. In
principle, one could implement a N log N sorting for both (which is what
the Standard suggests). In practice, I guess Microsoft developers didn't
bother...
>The issue concerning the tree pricing of the daily digitals is still open.
Good luck,
Luigi