Re: Cost of handling misaligned access

Liste des GroupesRevenir à c arch 
Sujet : Re: Cost of handling misaligned access
De : terje.mathisen (at) *nospam* tmsw.no (Terje Mathisen)
Groupes : comp.arch
Date : 08. Feb 2025, 13:36:29
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vo7j4f$20te$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0 SeaMonkey/2.53.20
MitchAlsup1 wrote:
On Fri, 7 Feb 2025 15:04:23 +0000, Michael S wrote:
  res += _mm256_extract_epi32(res0, 0);
  res += _mm256_extract_epi32(res0, 4);
  return res;
 Simple question:: how would you port this code to a machine
with a different SIMD instruction set ??
Years ago I solved this problem for an optimized Ogg Vorbis decoder:
I wrote a set of #defines which wrapped MMX/SSE intrinsics on the x86 side and Motorola's more capable Altivec instructions on the Apple side.
I had to limit myself a tiny bit in a couple of places, as well as expanding a Motorola operation into a pair of SSE instrinsics, but the resulting code still ran faster than all commercialy available libraries on both platforms.
If/when those instrinsics diverge more, then the problem would be significantly harder, but back then both Altivec and SSE used 128-bit registers.
Terje
--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Date Sujet#  Auteur
3 Feb 25 * Re: Cost of handling misaligned access106Anton Ertl
3 Feb 25 +- Re: Cost of handling misaligned access9BGB
23 Apr 26 +- 
4 Feb 25 +* Re: Cost of handling misaligned access40Anton Ertl
5 Feb 25 i`* Re: Cost of handling misaligned access39Terje Mathisen
5 Feb 25 i +* Re: Cost of handling misaligned access4Anton Ertl
5 Feb 25 i i+* Re: Cost of handling misaligned access2Terje Mathisen
6 Feb 25 i ii`- Re: Cost of handling misaligned access1Anton Ertl
6 Feb 25 i i`- Re: Cost of handling misaligned access1Anton Ertl
5 Feb 25 i `* Re: Cost of handling misaligned access34Michael S
6 Feb 25 i  +* Re: Cost of handling misaligned access32Anton Ertl
6 Feb 25 i  i`* Re: Cost of handling misaligned access31Michael S
6 Feb 25 i  i +* Re: Cost of handling misaligned access2Anton Ertl
6 Feb 25 i  i i`- Re: Cost of handling misaligned access1Michael S
6 Feb 25 i  i `* Re: Cost of handling misaligned access28Terje Mathisen
6 Feb 25 i  i  `* Re: Cost of handling misaligned access27Terje Mathisen
6 Feb 25 i  i   `* Re: Cost of handling misaligned access26Michael S
6 Feb 25 i  i    `* Re: Cost of handling misaligned access25Terje Mathisen
6 Feb 25 i  i     +* Re: Cost of handling misaligned access19Michael S
7 Feb 25 i  i     i`* Re: Cost of handling misaligned access18Terje Mathisen
7 Feb 25 i  i     i `* Re: Cost of handling misaligned access17Michael S
7 Feb 25 i  i     i  `* Re: Cost of handling misaligned access16Terje Mathisen
7 Feb 25 i  i     i   `* Re: Cost of handling misaligned access15Michael S
7 Feb 25 i  i     i    +- Re: Cost of handling misaligned access1Terje Mathisen
7 Feb 25 i  i     i    +* Re: Cost of handling misaligned access3MitchAlsup1
8 Feb 25 i  i     i    i+- Re: Cost of handling misaligned access1Terje Mathisen
8 Feb 25 i  i     i    i`- Re: Cost of handling misaligned access1Michael S
8 Feb 25 i  i     i    `* Re: Cost of handling misaligned access10Anton Ertl
8 Feb 25 i  i     i     +- Re: Cost of handling misaligned access1Terje Mathisen
8 Feb 25 i  i     i     +* Re: Cost of handling misaligned access6Michael S
8 Feb 25 i  i     i     i`* Re: Cost of handling misaligned access5Anton Ertl
8 Feb 25 i  i     i     i +- Re: Cost of handling misaligned access1Michael S
9 Feb 25 i  i     i     i +* Re: Cost of handling misaligned access2Michael S
11 Feb 25 i  i     i     i i`- Re: Cost of handling misaligned access1Michael S
9 Feb 25 i  i     i     i `- Re: Cost of handling misaligned access1Michael S
9 Feb 25 i  i     i     +- Re: Cost of handling misaligned access1Michael S
10 Feb 25 i  i     i     `- Re: Cost of handling misaligned access1Michael S
7 Feb 25 i  i     `* Re: Cost of handling misaligned access5BGB
7 Feb 25 i  i      `* Re: Cost of handling misaligned access4MitchAlsup1
7 Feb 25 i  i       `* Re: Cost of handling misaligned access3BGB
8 Feb 25 i  i        `* Re: Cost of handling misaligned access2Anssi Saari
8 Feb 25 i  i         `- Re: Cost of handling misaligned access1BGB
6 Feb 25 i  `- Re: Cost of handling misaligned access1Terje Mathisen
6 Feb 25 `* Re: Cost of handling misaligned access5Waldek Hebisch
6 Feb 25  +* Re: Cost of handling misaligned access3Anton Ertl
6 Feb 25  i`* Re: Cost of handling misaligned access2Waldek Hebisch
6 Feb 25  i `- Re: Cost of handling misaligned access1Anton Ertl
6 Feb 25  `- Re: Cost of handling misaligned access1Terje Mathisen

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal