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

MAINT: Mark npy_memchr with no_sanitize("alignment") on clang #21475

Merged
merged 1 commit into from May 9, 2022

Conversation

charris
Copy link
Member

@charris charris commented May 9, 2022

Backport of #21467.

Clangs sanitizer reports unaligned access here, which is correct
but intentional. It may well be that the code would be better of
trying to avoid this unaligned access (and rather vectorizing harder).

But, this is a bit of a tricky choice, since we have to optimize for
different use-cases (in particular very short scans may be interesting).

So changing this would best be done together with some more careful
benchmarks.

See also gh-21117, which introduced manual loop unrolling to avoid the
unaligned access.

Closes gh-21116

Clangs sanitizer reports unaligned access here, which is correct
but intentional.  It may well be that the code would be better of
trying to avoid this unaligned access (and rather vectorizing harder).

But, this is a bit of a tricky choice, since we have to optimize for
different use-cases (in particular very short scans may be interesting).

So changing this would best be done together with some more careful
benchmarks.

See also numpygh-21117, which introduced manual loop unrolling to avoid the
unaligned access.

Closes numpygh-21116
@charris charris added 03 - Maintenance 08 - Backport Used to tag backport PRs labels May 9, 2022
@charris charris added this to the 1.22.4 release milestone May 9, 2022
@charris charris merged commit cac0887 into numpy:maintenance/1.22.x May 9, 2022
@charris charris deleted the backport-21467 branch May 9, 2022 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
03 - Maintenance 08 - Backport Used to tag backport PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants