Skip to content

Conversation

@Cyberguru1
Copy link

K&R fast implementation of reverse

K&R  fast implementation of reverse
@marcluque
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants