Skip to content

Add Span overloads to System.Numerics.Vectors - #50062

Merged
tannergooding merged 1 commit into
dotnet:mainfrom
C-xC-c:main
Mar 23, 2021
Merged

tannergooding merged 1 commit into
dotnet:mainfrom
C-xC-c:main

Conversation

@C-xC-c

@C-xC-c C-xC-c commented Mar 22, 2021

Copy link
Copy Markdown
Contributor

Fixes #25608

@ghost

ghost commented Mar 22, 2021

Copy link
Copy Markdown

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost

ghost commented Mar 22, 2021

Copy link
Copy Markdown

Tagging subscribers to this area: @tannergooding, @pgovind
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #25608

Author: C-xC-c
Assignees: -
Labels:

area-System.Numerics, new-api-needs-documentation

Milestone: -

@GrabYourPitchforks

GrabYourPitchforks commented Mar 22, 2021 •

Copy link
Copy Markdown
Member

@tannergooding You've mentioned in the past that some SIMD instructions (specifically, instructions that access float* or double*) have some weirdness when it comes to alignment. Is using Read/WriteUnaligned in these code paths likely to have noticeable perf impact?

@tannergooding

Copy link
Copy Markdown
Member

Is using Read/WriteUnaligned in these code paths likely to have noticeable perf impact?

It shouldn't on modern CPUs. The only real impact should be if it crosses a cache line or page boundary and then only if you repeatedly do that in a hot loop.

@tannergooding

Copy link
Copy Markdown
Member

CC. @pgovind, can you give a quick review so we can merge?

@pgovind pgovind left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@tannergooding
tannergooding merged commit dddac29 into dotnet:main Mar 23, 2021
@tannergooding

Copy link
Copy Markdown
Member

Thanks for the contribution!

@ghost ghost locked as resolved and limited conversation to collaborators Apr 22, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.Numerics.Vectors and Span<T>

5 participants