I have a group of boxes (struct) that i need to sort constantly in different specific ways so I use a linked list that contains pointers that adress every box to sort them easily, and my program works in two "stages": an edit mode in which I add new boxes, delete them and sort them; and a performance mode, in which I don't need to change the order of the boxes neither add new ones nor delete them, just access to them on the last order that they were set in edit mode, at audio speed with a random index order, that means I access a box in every vector of 16 samples with a sampling rate of 48000 samples for second, this means I access a box every 0.3 milliseconds. Is efficient to use a linked list at this speed? What if I access a box every sample, every 0.02 milliseconds? Is it a good idea to resize memory dynamically for a handle array to store pointers that points to each box and update this array every time after I make a change on the linked list by iterating it so i can access the boxes faster on the perform stage?
Here is my box:
typedef struct
{
//box stuff...
} box;
Any kind of help will be appreciated