On Fri Oct 10 15:33:13 2025 +0000, Gabriel Ivăncescu wrote:
Yeah, but are you sure it's a good idea for attributes? Since that's implemented on Next in the enumerator, it becomes basically `O(N^2)` if it's enumerated (as opposed to random access which is just one iteration in principle, so `get_dispid` isn't nearly as bad).
I'm sure I don't want to pollute the common code with a workaround for such inefficiencies. If you think it’s important enough, you can just keep the attributes collection with their own enumerator implementation.
Theoretically, we could make random access faster. Linear `get_dispid` is just as bad, since performing `n` accesses is currently `O(n^2)` as well while it could be `O(n)`. Anyway, that’s off-topic here.