abseil / abseil/abseil-cpp

Discussion: the possibility to provide efficient SIMD implementation of Swiss Table on the Arm platform

Aperta
#1,096 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
question
Lingua principale
C++
Stelle
18.1k
Fork
3.2k
Merge medio
20h 36m
PR unite (30g)
1

Descrizione

The absl hash table on the x86 architecture uses SIMD (SSE2) instructions to help filter possible matching keys faster. However, I found that there is no corresponding SIMD implementation on the arm platform.

At first, I thought the absl community was not motivated to optimize it for the less-used arm platform. So, I tried to implement it myself using neon SIMD instructions on the arm architecture, but I quickly found a problem. When using the SSE instruction set, `_mm_movemask_epi8` can be implemented with only one instruction. Yet there is no direct counterpart in the neon instruction set, and every alternative I can find requires several more instructions, which introduces a much larger latency.

Anyway, I tried to achieve the same method using SIMD instructions on the arm platform. But as expected, the speed is slightly slower than the portable C++ code.

So I would like to ask Googlers if anyone has ever tried to implement a SIMD adaptation of the Swiss Table for the Arm architecture, and if they encountered similar problems. And is the reason why there is still no SIMD-optimized version for Arm, as I thought because the arm platform lacks instructions that can efficiently implement the Swiss Table.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

La issue riguarda l’implementazione SIMD della tabella hash di absl. Esamina il codice SSE2 esistente nella codebase, probabilmente nei file relativi a swiss_table o alle tabelle hash. Studia le intrinsic ARM NEON e la sfida specifica di emulare in modo efficiente _mm_movemask_epi8. È necessario eseguire un benchmarking rispetto all’implementazione portabile in C++ per validare qualsiasi nuovo approccio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp
Ambito
performance
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.