On 6/10/21 2:25 PM, Giovanni Mascellani wrote:
Hi,
the only point that I have not discussed replying to Derek is:
Il 10/06/21 18:25, Zebediah Figura (she/her) ha scritto:
- should the samples/requests be stored in a flat array instead of a
linked list? Based on usage patterns it seems that'd be easier and more efficient.
I used a list because I saw that they're very used in Wine and got the feeling they're somehow the "standard way" for ordered containers where you don't need random access.
Personally I have no strong feelings in this specific case, neither ease nor efficiency seem to me to be clearly in favor of either of the two alternatives, especially given that the two approach have the same asymptotic complexity and that, in practice, I expect this feature to be hardly ever used, let alone for many samples/requests.
I'll do whatever gives me better probability to have a valuable Signed-off-by. :-P
I mean, just from a drive-by it looks a bit easier, since all you're doing is storing them in order and then deleting them all at once—no random-access insertion or deletion. Granted, there is a reason my question was phrased like a question ;-)
I think in general Wine code uses lists or arrays, depending on which is actually easier, or if (as rarely) there's a performance concern. Very often that's lists, but not always.