speed optimization of edge evaluation