Result memoization in logic nodes to speed up simulation.