[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Vectorization, SIMD
From: |
Óscar Fuentes |
Subject: |
Re: Vectorization, SIMD |
Date: |
Wed, 23 Apr 2025 17:00:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> With current Clang, auto-vectorization is on with -O2 or better, and
> when -march=native or something similar is specified which ensures that
> SIMD instructions are supported. Without the -march=xxx it doesn't seem
> to happen.
>
> The "problem" with auto-vectorization is that it fails to optimize loops
> in many cases. (The .org file contains a compiler option with which one
> can see why it fails. By default, clang says nothing.) For example, it
> looks like a break or return in a loop makes it fail. Also a switch,
> and I don't know what else.
>
> IOW, it's doesn't feel like something that can be relied on, if one
> really wants SIMD, especially if some code is compiled by different
> compilers or different versions of the same compiler.
Did you try an Emacs build with auto-vectorization turned on? Some
benchmark that theoretically could benefit from it.
IIRC, hand-coded vectorization reportedly had an impact of orders of
magnitude on some character-manipulation tasks, such as text searching.
Re: Vectorization, SIMD, Gerd Möllmann, 2025/04/26