os-tutorial
os-tutorial copied to clipboard
Update string.c
K&R fast implementation of reverse
Could you elaborate on why the implementation you are suggesting is faster? 🤔 From my understanding it does the same amount of iterations, but some extra work due to the "reverse indexing".
I put it in compiler explorer with -O3 to see the exact differences, see for yourself: https://godbolt.org/z/1d34bc9f6