Skip to content
Discussion options

You must be logged in to vote

I don't trust ChatGPT at all on (non-well known) algorithm.

Only this part is transformable into SIMD:

                    s2 ^= s0;
                    s3 ^= s1;
                    s1 ^= s2;
                    s0 ^= s3;

into

Vector128<ulong> lower = Create(s0, s1);
Vector128<ulong> upper = Create(s2, s3);
upper ^= lower;
lower ^= upper.Shuffle([1, 0]);

Every other steps heavily depends on the results of last step, and are asymmetric on 4 state values. It's not candidate for SIMD at all.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@Xyncgas
Comment options

@huoyaoyuan
Comment options

@tannergooding
Comment options

@Xyncgas
Comment options

@Xyncgas
Comment options

Answer selected by Xyncgas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants