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

std: Optimize functions that deal with bool vectors for x86. #16648

Closed

Conversation

notcancername
Copy link
Contributor

Add doc comments. Add tests.

@notcancername
Copy link
Contributor Author

No benchmark, but: https://godbolt.org/z/7nqP6zqYr

lib/std/simd.zig Outdated Show resolved Hide resolved
@notcancername
Copy link
Contributor Author

notcancername commented Aug 2, 2023

This seems to cause some issues with the C backend? Should I add a workaround for that? Or skip the tests for CBE?

Copy link
Member

@andrewrk andrewrk left a comment

Choose a reason for hiding this comment

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

Your godbolt link shows x86_64 but your logic tests for both x86 and x86_64:

zig/lib/std/target.zig

Lines 874 to 879 in 7ab306d

pub inline fn isX86(arch: Arch) bool {
return switch (arch) {
.x86, .x86_64 => true,
else => false,
};
}

Is the new code better for 32-bit x86 as well?

lib/std/simd.zig Outdated Show resolved Hide resolved
Copy link
Member

@andrewrk andrewrk left a comment

Choose a reason for hiding this comment

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

I asked this question in the previous review:

Your godbolt link shows x86_64 but your logic tests for both x86 and x86_64:
Is the new code better for 32-bit x86 as well?

I don't see an answer to this question.

lib/std/simd.zig Outdated Show resolved Hide resolved
lib/std/simd.zig Outdated Show resolved Hide resolved
@notcancername
Copy link
Contributor Author

The answer is yes.

@andrewrk andrewrk force-pushed the optimize-various-simd branch from 40ea4b3 to e131151 Compare March 14, 2024 10:57
@andrewrk
Copy link
Member

andrewrk commented May 9, 2024

CI checks failing, no updates in 30+ days.

@andrewrk andrewrk closed this May 9, 2024
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.

3 participants