Re: [nsd-users] Run-time effects of new SIMD code

2024-07-19 Thread Jeroen Koekkoek via nsd-users
Hi Anand, The build host doesn't need to have the same features as the target. However, the compiler running on the build host must know how to compile for SSE4.2 and AVX2 architectures. For example, you can compile for x86_64 on ARM (and vice versa). It works in the same way for extensions. So,

Re: [nsd-users] Run-time effects of new SIMD code

2024-07-19 Thread Anand Buddhdev via nsd-users
Thanks for the update Jeroen, and for creating the issues to track the suggestions. You didn't answer the parts of my email relating to what happens at compile time, and how the resulting NSD binary is affected depending on what architecture it's compiled on. If you could expand on those, I'd appr

Re: [nsd-users] Run-time effects of new SIMD code

2024-07-19 Thread Jeroen Koekkoek via nsd-users
Hi Anand, Doing it with "nsd -v" is not implemented right now because it's meant to be transparent to users of the library, but I think you're right and it'd be good to show the info. The kernel is selected when the parse function is called. For NSD it makes sense to select one on startup and alw

Re: [nsd-users] Run-time effects of new SIMD code

2024-07-17 Thread Anand Buddhdev via nsd-users
On 17/07/2024 16:57, Jeroen Koekkoek wrote: Hi Jeroen, That is indeed correct. At runtime the CPUID instruction is used to detect which extensions are offered and it chooses based on that. When compiling on x86_64 with SSE4.2 and AVX2 enabled, the binary will actually contain 3 parsers, the mos

Re: [nsd-users] Run-time effects of new SIMD code

2024-07-17 Thread Jeroen Koekkoek via nsd-users
Hi Anand, Stuart, That is indeed correct. At runtime the CPUID instruction is used to detect which extensions are offered and it chooses based on that. When compiling on x86_64 with SSE4.2 and AVX2 enabled, the binary will actually contain 3 parsers, the most optimal one is used at runtime. Optim

Re: [nsd-users] Run-time effects of new SIMD code

2024-07-17 Thread Stuart Henderson via nsd-users
On 2024/07/17 15:47, Anand Buddhdev via nsd-users wrote: > Hi NSD developers, > > I've been following recent discussion and activity around building NSD 4.10, > triggered by build > failure in Homebrew. I see that you added some code to detect more things and > adjust the build > based on what t

[nsd-users] Run-time effects of new SIMD code

2024-07-17 Thread Anand Buddhdev via nsd-users
Hi NSD developers, I've been following recent discussion and activity around building NSD 4.10, triggered by build failure in Homebrew. I see that you added some code to detect more things and adjust the build based on what type of processor is detected. If one were to build NSD on an x86_64 CPU