In assembly language, both are in the same structure:
i > -1
cmp [register with i value],-1 jg [somewhere]
i >= 0
cmp [register with i value],0 jge [somewhere]
According to the transition flags used , the jg command does two flag mappings (ZF = 0 and SF = OF), but jge does only one (SF = OF).
So, I am tempted to say that both use almost the same registers and processor cycles, possibly a very quick comparison for i >= 0 .
source share