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: Søren Hauberg
Subject: Re: Speed improvements and slowups 3.0.x to latest 3.1.x
Date: Sat, 07 Feb 2009 09:47:04 +0100

lor, 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?

Soren



reply via email to

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