- Joined
- Apr 30, 2006
- Messages
- 1,354
- Likes received
- 0
- Thanks received
- 0
- Location
- London / Nottingham
AtW said:Look dude, let me explain it in terms that even you should be able to comprehent:
a) using Array.Sort in my application made that sorting account for about 75% of runtime for one typical class of data: I know this for certain as I use profiler extensively, it lead me to Microsoft's source
b) I took source code of Array.Sort and optimised and put into my own class Sorter.Sort - I use same data, every thing else is same: now sorting is less than 10% of run time
Is that clear? If I could achieve such a major speed up without changing data that was sorted or anything else, then something is bloody wrong if Microsoft can't do it out of the box.
madhippy: the application in question is a search engine that should scale as efficiently as possible to billions of pages.
Just out of interest, what type and set size are you sorting and what version of the runtime are you using (1.1 or 2.0)? Also what is the application precisely - it may be the wrong use if you have to blow a large chunk of time on a sort like that.
Microsoft provide "generic" sorting functionality but if you need anything high performance it's up to you. There is no such thing as a high performance, generic type-independent sorting algorithm - you have specialised it to your requirements.
Oh and I'm self taught as well
Via Knuth's books and experimentation.
Last edited:
09:23