|
-
Sep 2nd, 2005, 08:51 AM
#10
Re: Sorting small arrays. Witch algo is fastest.
 Originally Posted by kedaman
I see you are still typing witch instead of which, but if you think its faster to type then you are wrong
Grrr...give me a break here..
I'll try to remember it this time.. ..it is a linux command too, and I always have to try 3-4 times before I manage to write it right...
 Originally Posted by kedaman
Its possible to use merge sort but it wont have the speed benefits, you'll just be throwing around the indexes. Anyway, are the indexes relatively close to each other? You might get away with something like radix or bucket sort.
What do you mean by indexes relatively close? I have never read up on Radix or bucket sort. Just heard about them. So no idea how they will affect this.
Ok, just to get you more up to date on what is goin on here. This is for D# right. And what I am sorting is the polygons that we will draw. We sort them from the back to the front. It is maximum about 144 polygons to draw at any time on our maps. So I don't think it will be nessesary to use a BSP with painters algorithm and all that fancy stuff. The thing is that since you don't turn around so fast most often in the game, you are most likely sorting more or less the same polygons each time. Hence the array you are sorting will nearly be sorted every time.
I just tested with shell sort. And it tool less then 0.2FPS to sort about 144polygons. So I don't think it will be that big a difference no matter what sorting algo we use.
BTW there where some artifacts on the picture. I have too look into what went wrong.
- ØØ -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|