Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use a more efficient method to copy [u8] #549

Merged
merged 1 commit into from
Feb 8, 2021

Conversation

the8472
Copy link
Contributor

@the8472 the8472 commented Feb 7, 2021

I saw clone_from_slice showing up in some profiles and the assembly looks like a fairly dumb loop of mov instructions. copy_from_slice should optimize better since it calls copy_nonoverlapping (memcpy) internally.

Copy link
Collaborator

@philipc philipc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Could you change this for EndianReader too please?

@philipc philipc merged commit 705842a into gimli-rs:master Feb 8, 2021
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.

None yet

2 participants