From 4ade66de5a508513826ae1ca2a76a9baeed527df Mon Sep 17 00:00:00 2001 From: Stefan Nitz Date: Fri, 31 Jul 2026 01:57:29 +0200 Subject: [PATCH] Remove redundant recalcNodeList calls setNode has settled the netlist itself since aed0d9a moved recalcNodeList into it. The calls that follow setNode in step and initAndResetChip predate that commit and have been no-ops ever since. recalcNodeList leaves both worklists empty: its loop exits when lists_switch has just swapped an empty listout into listin, and listout_clear then zeroes listout and its bitmap. A second call switches two empty lists, sees an empty listin, and breaks on the first iteration without visiting a node. All it costs is a 216-byte memset per half-cycle, so no simulation result changes and the benchmark does not move. --- perfect6502.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/perfect6502.c b/perfect6502.c index 1960438..3e632a3 100644 --- a/perfect6502.c +++ b/perfect6502.c @@ -152,9 +152,8 @@ step(void *state) { BOOL clk = isNodeHigh(state, clk0); - /* invert clock */ + /* invert clock; setNode settles the netlist itself */ setNode(state, clk0, !clk); - recalcNodeList(state); /* handle memory reads and writes */ if (!clk) @@ -191,7 +190,6 @@ initAndResetChip(void) /* release RESET */ setNode(state, res, 1); - recalcNodeList(state); cycle = 0;