Original Post
I have scene nodes pushed into my renderer by my spatial partitioning structure, which then needs to be sorted by render state, shader etc. My questions are: a ) what structure to use? a linked list or an array. using a preallocated block for either could save on allocation time (pooled memory), but would the cache misses really be that much of a performance drop in linked lists? b ) what sorting algorithm is best for these situations? I was thinking either a simple quick sort or some kind of temporary binary tree into an array. What are your thoughts? Cheers.