utility to lazily check first difference in a trace
generate traces without crazy memory overhead