qsantos / ripmors

Blazingly fast Morse code encoding/decoding
Apache License 2.0
13 stars 0 forks source link

Use SIMD for decoding #10

Open qsantos opened 3 months ago

qsantos commented 3 months ago

morse_to_binary currently uses SWAR to convert each Morse symbol of a character into a bit. The 64-bit multiplication is problematic for SSE and AVX ISAs. However, the carry-less instruction from AVX-512 might allow us to perform SWAR within each lane of a SIMD register.

With that being said, the main issue is with gathering the Morse symbols of each character in a separate lane. Something might be done with the expand instruction from AVX-512.