Speed up dependency matching with binary search

When searching for a specific name, we can just do a binary search
to find the gems by their name.
To do this, we need to sort the tuples by name, which is a little
overhead.