Hi, 

> 2. Unfortunately, there is another wrinkle that I failed to consider: If you 
> search
> the web for "VirtualBox pclmulqdq" you can see a few reports from not very 
> long
> ago that some hypervisors don't enable the CPUID for pclmul. I don't know how
> big a problem that is in practice today, but it seems we should actually have
> separate checks, with fallback. Sorry I didn't think of this earlier.

If someone using a VM that doesn't support a 15 yr old feature, then I would 
argue performance is not 
the top priority for them.  But that’s up to you. I will work on adding it 
unless you change your mind.  

Also, do we really need to have both USE_SSE42_CRC32C and 
USE_SSE42_CRC32C_WITH_RUNTIME_CHECK
features support? The former macro is used to enable running the SSE42 version 
without a runtime check 
when someone builds with -msse4.2. The code looks fine now, but the runtime 
dispatch rules get complicated
as we add the PCLMUL and AVX512 dispatch in the future. IMO, this additional 
complexity is not worth it.
The cpuid runtime dispatch runs just once when postgres server is first setup 
and would hardly affect performance. 
Let me know what you think.

Raghuveer

Reply via email to