Skip to content
This repository was archived by the owner on Apr 22, 2025. It is now read-only.

Conversation

@rabkin
Copy link

@rabkin rabkin commented Jan 19, 2023

Enable SSE4.1 and AVX2 implementations to be built and used on x86, and avoid unnecessary uses of uint64_t for small values

HH_INLINE explicit V256(T i)
#if HH_ARCH_X86
// _mm_cvtsi64_si128 is not available on x86
: V256(i,i,i,i) {}
Copy link
Member

Choose a reason for hiding this comment

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

This likely won't work on MSVC. How about we use _mm256_set_epi32 instead?

Copy link
Author

Choose a reason for hiding this comment

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

This works on MSVC toolkit 170 but I've changed it to use _mm_insert_epi32, which should generate better code I think.

@jan-wassenberg
Copy link
Member

Nice work :) We don't officially support 32-bit but these seem like reasonable changes that we can keep in.

FYI we haven't yet set up the infra for syncing github with our internal code (the previously used approach has been deprecated). I will be out until Jan31 and hope we can get to this in mid-Feb.

@jan-wassenberg
Copy link
Member

Nice, thanks for making the change :)

@rabkin
Copy link
Author

rabkin commented May 3, 2023

I will be out until Jan31 and hope we can get to this in mid-Feb.

I hope I'm not bothering you by reminding you about this now.

@jan-wassenberg
Copy link
Member

Sorry we still haven't merged this. In the meantime there is another implementation by John Platts which uses Highway and thus has much better support for various targets including x86. Would you like to switch to that one?
https://github.com/johnplatts/simdhwyhash

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.

2 participants