I'd say the second one is slower, because the addition is a read-modify-write operation, so edi will be tied up for several uops. This is bad, since the second instruction depends on edi. Also, the first one takes less space, so it fits into cache better.
However, the second code may improve performance if you insert some other instruction between add and mov. If that instruction doesn't use edi, then it could be fed into another pipeline and executed in parallel.
Comments
However, the second code may improve performance if you insert some other instruction between add and mov. If that instruction doesn't use edi, then it could be fed into another pipeline and executed in parallel.