There is a huge difference in that the contents of this -block and that -block can be executed in the second form, while the first form allows you to execute at most one of them.
Compare these two Python snippets:
x = 10 if x > 5: print "x larger than 5" elif x > 1: print "x larger than 1" else: print "x not larger than 1"
and
x = 10 if x > 5: print "x larger than 5" if x > 1: # not using else-if anymore! print "x larger than 1" else: print "x not larger than 1" # output line 1: x larger than 5 # output line 2: x larger than 1
As others have noted, you generally should not worry about performance between these changes as much as you should worry about correctness. However, since you asked ... everyone else is equal, the second form will be slower because the second condition needs to be evaluated.
But if you have not determined that the code written in this form is a bottleneck, you should not even think about optimization. When moving from the first form to the second, you will abandon the first if statement and return a forced evaluation of the second condition. Depending on the language, this is probably an extremely minor difference.
source share