In Sipser's Introduction to the Theory of Computation, the author explains that two strings can be compared by “zigzagging” back and forth between them and “crossing off” one symbol at a time (i.e., replacing them with a symbol such as $x$). This process is displayed in the following figure (from Sipser):
However, this process modifies the strings being compared, which would be problematic if the Turing machine needs to access these strings in the future. What are ways of performing a string comparison without modifying the strings?

0˙to0? Is that any different to just using different symbols, where0maps toyand1maps tohor anything else? – terdon Aug 10 '21 at 10:57