public int CompareAge(ITextSourceVersion other)
{
if (other == null)
throw new ArgumentNullException("other");
var o = other as Version;
if (o == null || provider != o.provider)
throw new ArgumentException("Versions do not belong to the same document.");
// We will allow overflows, but assume that the maximum distance between checkpoints is 2^31-1.
// This is guaranteed on x86 because so many checkpoints don't fit into memory.
return Math.Sign(unchecked(id - o.id));
}