Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

MemoryPoolIterator2.Seek performance #514

Closed
wants to merge 1 commit into from

Conversation

benaadams
Copy link
Contributor

Static vectors by ref rather than by copy
Faster path when length < Vector<byte>.Count
Skip Vector path when Vector.IsHardwareAccelerated != true unless in debug/test (e.g. linux and x86)

Linux hopefully resolved in RC2? https://github.com/dotnet/coreclr/issues/983

Resolves #512
Resolves #515

var data = new Vector<byte>(array, index);
var byte0Equals = Vector.Equals(data, byte0Vector);
#endif
if (following >= _vectorSpan)
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix indentation.

@cesarblum
Copy link
Contributor

Did you do any benchmarks for this change?

@benaadams
Copy link
Contributor Author

Will revisit with #519 as source (or rather with hindsight of knowing where am going)

@benaadams benaadams closed this Dec 22, 2015
@cesarblum
Copy link
Contributor

I really like the passing as ref aspect of this PR. Are the other changes required because of it? If you could send a PR with only the change to using ref, that would be great to benchmark in our setup.

@benaadams
Copy link
Contributor Author

Removing the readonly is needed to pass by ref :(

@benaadams
Copy link
Contributor Author

@CesarBS updated in #524

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants