Big improvement from vector implementation of the extended R subgraph function.