mirror of
https://github.com/mist64/perfect6502.git
synced 2024-12-28 11:31:50 +00:00
don't recalc transistors if gate value has not changed - 2x speedup!
This commit is contained in:
parent
c8c2038b6c
commit
80a13b5f7a
@ -508,10 +508,12 @@ recalcNode(nodenum_t node)
|
||||
*/
|
||||
for (count_t i = 0; i < group_count(); i++) {
|
||||
nodenum_t nn = group_get(i);
|
||||
BOOL needs_recalc = get_nodes_state_value(nn) != newv_value;
|
||||
set_nodes_state_value(nn, newv_value);
|
||||
set_nodes_state_floating(nn, newv_floating);
|
||||
for (count_t t = 0; t < nodes_gatecount[nn]; t++)
|
||||
recalcTransistor(nodes_gates[nn][t]);
|
||||
if (needs_recalc)
|
||||
for (count_t t = 0; t < nodes_gatecount[nn]; t++)
|
||||
recalcTransistor(nodes_gates[nn][t]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user