Previously, the code was O(n^2) because it iterated over all interface sockets, and for each it tried to find the corresponding index by iterating over all inputs again. Now, a `VectorSet` is used to make finding the index `O(1)`. The new utility function may also be useful elsewhere. Pull Request: https://projects.blender.org/blender/blender/pulls/132272