separated comparison code for overhead tests