Comparing the wave traces of 2 different simulations in Modelsim is quite easy.
Step 1: in the reference simulation, save the dataset as follows:
dataset save sim vsim_ref.wlf
Step 2: in the simulation you want to compare, open the reference dataset and start the comparison
dataset open vsim_ref.wlf vsim_ref compare start vsim_ref sim compare add -win [ view -new -title cmpr wave ] -recursive -all * compare options -track compare run
Standard parameters set for the comparison are 1000 differences in total and maximum 100 differences for a single signal. This limit can be increased in the Tools > Comparison > Settings window.