The simulation system is relatively slow. A clock can run at about 20Hz. That can be enough but your pc can do more. At this moment all gates are requested to recalculate their outputs which is not efficient. It would be better to invent a level change notification system. All parts of the circuit - including modules, pins and wires.
Parts can register to listen to ‚child‘-parts e.g. a pin can register a few wires and vice versa. Then a part can fire a level change. Then a output can be recalculated...
The simulation system is relatively slow. A clock can run at about 20Hz. That can be enough but your pc can do more. At this moment all gates are requested to recalculate their outputs which is not efficient. It would be better to invent a level change notification system. All parts of the circuit - including modules, pins and wires. Parts can register to listen to ‚child‘-parts e.g. a pin can register a few wires and vice versa. Then a part can fire a level change. Then a output can be recalculated...