This function returns one of the following values:
0 if the two values are equal.
-1 if v1 is smaller than v2.
1 if v1 is greater than v2.