Suggestion for optimizing, especially for larger multi-part circuits: allow a sub-circuit to be expanded / collapsed. When expanded, show the full animation & whatnot. When collapsed, run an optimized chunk of code which has the same behavior, and just output the results at the proper times. When it's collapsed it's a "black box" anyway, might as well take advantage of that.
This way, if someone builds some massively complicated integrated circuit, you can run it as fast as possible when it's not being animated.