‹ BackHN Continuity

Thread

Show HN: SIMD Viterbi Decoder in Rust

63 points · 11 comments · brian-armstrong

  1. eminence32 · · focus · HN ↗
    Could this library be used decode signals from a GOES satellite downlink? goestools uses libcorrect for this and building a rust version might be fun.

    [1] <a href="https:&#x2F;&#x2F;github.com&#x2F;pietern&#x2F;goestools" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pietern&#x2F;goestools

    1. brian-armstrong · · focus · HN ↗
      You could certainly call this crate through a shim in goestools but you&#x27;d have to add a Rust dependency. But you could also rewrite goestools in Rust, though it wouldn&#x27;t be a small undertaking. This crate does have everything you&#x27;d need for the forward error correction, at least.
      1. femto · · focus · HN ↗
        How do you find the speed of the Rust version of your FEC vs, the C version?
        1. brian-armstrong · · focus · HN ↗
          I used the benchmarking binaries that ship with libfec. My own crate has a libfec-compatible C shim, so I can link the benchmark against the Rust crate. The benchmark itself reports time spent for a given number of iterations, so the throughput can just be extrapolated from that.
          1. femto · · focus · HN ↗
            I got caught out by my Australianism!

            &quot;How do you find the speed of the Rust version of your FEC vs, the C version?&quot;

            translates from &quot;Australian&quot; to &quot;English&quot; as:

            &quot;What is the speed of the Rust version of your FEC vs, the C version?

            Though it was interesting to know how you do it. I&#x27;m interested in the speed, as I once looked into using Rust for a signal processing project, but ultimately went with C++ because the team wasn&#x27;t familiar with Rust. At the time, it seemed to me that Rust had the potential to go faster.

            1. brian-armstrong · · focus · HN ↗
              Oh! Gotcha! I put a table in the README that lays it all out <a href="https:&#x2F;&#x2F;github.com&#x2F;brian-armstrong&#x2F;fec#performance" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;brian-armstrong&#x2F;fec#performance

              tldr: My library matches or beats libfec&#x27;s SSE2 assembly for convolutional codes and pretty steadily beats it in Reed-Solomon. For the convolutional codes, my crate is using a generic, templated decoder rather than hand-written assembly, so it was nice to see that I could match the performance.

              1. femto · · focus · HN ↗
                Nice! Thanks too for putting the work into this library.
        2. johschmitz · · focus · HN ↗
          Performance result are presented here as far as I understand: <a href="https:&#x2F;&#x2F;github.com&#x2F;brian-armstrong&#x2F;fec#performance" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;brian-armstrong&#x2F;fec#performance
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.