most efficient way to refer to a vertex in a graph