octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speed improvements and slowups 3.0.x to latest 3.1.x


From: Jaroslav Hajek
Subject: Re: Speed improvements and slowups 3.0.x to latest 3.1.x
Date: Sat, 7 Feb 2009 11:28:44 +0100

On Sat, Feb 7, 2009 at 9:47 AM, Søren Hauberg <address@hidden> wrote:
> lør, 07 02 2009 kl. 08:22 +0100, skrev Jaroslav Hajek:
>> 1. the algorithm, borrowed from Python, is really targeted to sorting
>> arrays containing already sorted segments, i.e. re-sorting. I did a
>> few experiments here ind it seems that std::sort from gcc 4.3,
>> implementing introsort, wins for random arrays but gets beaten for
>> arrays that contain a lot of sorted segments. Maybe we could create a
>> hybrid, falling back to std::sort if no long runs are detected.
>
> The 'sort' help text says
>
>     For equal elements, the indices are such that the equal elements
>     are listed in the order that appeared in the original list.
>
> Does std::sort make this guaranty?
>
> Søren
>

No, it doesn't, stable_sort does. But I think I was indeed comparing
stable_sort.



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]