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.

Optimized versions can be disabled with --disable-westmere (SSE4.2) and
--disable-haswell (AVX2) if desired btw.

Note that "sub-optimal" is still a couple times faster than 4.9
(parsing, does not translate to zone loading in 1-1 fashion yet, but
we'll get to that :-)).

Best regards,
Jeroen


On Wed, 2024-07-17 at 14:57 +0100, Stuart Henderson via nsd-users
wrote:
> 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 type of processor is detected.
> > 
> > If one were to build NSD on an x86_64 CPU with Haswell
> > architecture, and then run this build on
> > another x86_64 CPU that doesn't have that architecture, will NSD
> > not run, or will it crash, or
> > will it silently use sub-optimal code?
> 
> Looking at the code, it's using runtime detection based on checking
> cpuid results, so it should use whatever is the most optimal for the
> cpu
> on the machine where it runs.
> 
> _______________________________________________
> nsd-users mailing list
> nsd-users@lists.nlnetlabs.nl
> https://lists.nlnetlabs.nl/mailman/listinfo/nsd-users

_______________________________________________
nsd-users mailing list
nsd-users@lists.nlnetlabs.nl
https://lists.nlnetlabs.nl/mailman/listinfo/nsd-users

Reply via email to