From a4c9cb6d2856521f6d878c229f156b347cfd880f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 3 May 2024 20:19:03 +0530 Subject: [PATCH] Small performance increase in SIMD code Use OpenMP annotations with simde as the simde docs recommend. --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index d0923b861..895aa08b2 100755 --- a/setup.py +++ b/setup.py @@ -733,6 +733,8 @@ def get_source_specific_cflags(env: Env, src: str) -> List[str]: ans = list(env.cflags) # SIMD specific flags if src in ('kitty/simd-string-128.c', 'kitty/simd-string-256.c'): + # simde recommends these are used for best performance + ans.extend(('-fopenmp-simd', '-DSIMDE_ENABLE_OPENMP')) if env.binary_arch.isa in (ISA.AMD64, ISA.X86): ans.append('-msse4.2' if '128' in src else '-mavx2') if '256' in src: