Right now, Binder uses an array for it's bindings, and to determine order, that depends on using table.sort
for binding, and table.find
and table.remove
for unbinding, which can be quite slow with multiple bindings, requiring linear search (this could change) and array shifting.
With a (doubly) linked list, I can unbind very quickly, with no big difference of speed when there's multiple bindings, and bind something without array shifting, which is quite nice.
Using a linked list also means being able to finally have immediate signal mode behaviour, (which would allow routine-recycling), which is NOT possible safely with an array.
Another less important thing is that using a linked-list means that the allocation used for setting a binding to a certain index can be freed for other things, so binding 1000 elements at once and then unbinding them later won't cause a permanent memory leak;