Page 2 of 2

Re: Draw Order

Posted: Tue Jun 14, 2011 6:10 pm
by Kadoba
vrld wrote:Unless you have some information you can (given an object's position) use to tell which object will come next, you won't be able to sort faster than table.sort does. Using a linked list wont make things faster. If it did, you'd had invented a sorting algorithm that can sort faster than in O(n logn), which is not possible*.
The sorting itself is not faster but the number of elements the algorithm would work on would be drastically reduced depending on the structure of the game. Best case scenario is that nothing moves and no sorting is done at all.

Skip lists look pretty neat though. I'll mess around with them a bit.