From 24d702d0beb87d4fb7ff0ac19f9e06f1cdaa3203 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Tue, 4 Sep 2018 09:05:53 -0700 Subject: [PATCH] Save a lookup for router1 --- common/router1.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/router1.cc b/common/router1.cc index 5cd4414c..7f852dca 100644 --- a/common/router1.cc +++ b/common/router1.cc @@ -197,8 +197,9 @@ struct Router NPNR_ASSERT(next_delay >= 0); - if (visited.count(next_wire)) { - if (visited.at(next_wire).delay <= next_delay + ctx->getDelayEpsilon()) + auto it = visited.find(next_wire); + if (it != visited.end()) { + if (it->second.delay <= next_delay + ctx->getDelayEpsilon()) continue; #if 0 // FIXME if (ctx->debug)