A version with prerelease identifiers has lower precedence than the same core version without them. Within prerelease, the first differing identifier decides.
Numeric identifiers compare as integers
alpha.10 is greater than alpha.2 even though lexical string order would say otherwise.
A longer equal prefix has higher precedence
When all compared identifiers are equal, the prerelease with additional identifiers has higher precedence.