This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Improvement to std::sort<>, was: Improvement to std::copy<>


Oops, sorry that's std::sort<>. I guess some sleep is on the menu!!!

-Dhruv.

On Thu, 2003-08-14 at 21:48, Dhruv Matani wrote:
> I went through the std::copy algorithm, and it seems that it uses the
> insertion sort algorithm. I have tried to modify the unguarded insertion
> function to be faster. The results show very minor improvements, but I
> guess that can be improved. Now, instead of iterating through the entire
> array form the last element, it uses binary sort to find the corerect
> postion for insertion, and then uses std::copy backward to actually move
> the elements, because copy backwward might be optimized for some data
> types. I can post the code if needed.
-- 
	-Dhruv Matani.
http://www.geocities.com/dhruvbird/




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]