[{"data":1,"prerenderedAt":201},["ShallowReactive",2],{"project-49176212":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":35,"aspects":36,"strip":41,"post_text":42,"what":43,"said":72,"maker_in_thread":125,"shape":135,"grid":139,"attempts":162,"same_week":163,"maker_shows":126,"maker_hidden":193,"reader_version":194,"card":195},"49176212","libcorrect (Rust port, repo brian-armstrong\u002Ffec)","SIMD Viterbi Decoder in Rust","title","Show HN: SIMD Viterbi Decoder in Rust","https:\u002F\u002Fgithub.com\u002Fbrian-armstrong\u002Ffec","github.com","brian-armstrong",1785883025,2026,64,11,1017,4366,24,"notable","languages","error correction library","library",[24,25,26,27,28],"viterbi decoder","convolutional codes","forward error correction","simd rust","reed solomon","curious",0.231,{"positive":32,"neutral":33,"mixed":34,"critical":34},2,3,0,5,{"execution":37,"idea":38,"performance":40},{"positive":34,"critical":34},{"positive":39,"critical":34},1,{"positive":34,"critical":34},[33,34,35,34,33,34,34,34,35,33,34],"I wrote libcorrect in C in 2016 and wanted to revisit it in Rust. Instead of doing just a direct conversion, I went down the rabbit hole of making Rust's std::simd work for me. I ended up with a templated, generic Viterbi decoder for convolutional codes that dispatches the decode at runtime depending on which instruction sets are available. For small rates and orders, the entire decode lives in registers. Larger codes work through memory but take advantage of some acceleration structures.\n\nI also spent some time building a tool to find optimal (max d_free) conv codes for a given rate and order",{"problem":44,"audience":50,"pricing":50,"motivation":51,"time_to_build":50,"stack":55,"openness":70,"stage":71,"team_size":71},{"value":45,"source":46,"evidence":47},"Fast forward error correction decoding for convolutional codes","maker",[48],{"id":49},"post",null,{"value":52,"source":46,"evidence":53},"Revisit his 2016 C library libcorrect in Rust and explore std::simd",[54],{"id":49},[56,60,64],{"value":57,"source":46,"evidence":58},"Rust",[59],{"id":49},{"value":61,"source":46,"evidence":62},"std::simd",[63],{"id":49},{"value":65,"source":46,"evidence":66},"C shim compatible with libfec",[67],{"id":68,"by":11,"text":69},"49180437","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…","open_source","unknown",{"praise":73,"objections":85,"requests":86,"questions":101,"alternatives":116},[74],{"value":75,"source":76,"evidence":77},"Matching libfec SSE2 performance is impressive","commenter",[78,81],{"id":79,"by":11,"text":80},"49180980","Oh! Gotcha! I put a table in the README that lays it all out https:\u002F\u002Fgithub.com\u002Fbrian-armstrong\u002Ffec#performance tldr: My library matches or beats libfec's SSE2 assembly for…",{"id":82,"by":83,"text":84},"49181416","femto","Nice! Thanks too for putting the work into this library.",[],[87,94],{"value":88,"source":76,"evidence":89},"Add LDPC codes",[90],{"id":91,"by":92,"text":93},"49180683","nickcw","I was looking at the reed Solomon implementation. I've done a few of those in the past! I note that you are using logs for multiplication. I always used to use a 64kb table for…",{"value":95,"source":76,"evidence":96},"Support for GOES satellite decoding",[97],{"id":98,"by":99,"text":100},"49178431","eminence32","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]…",[102,112],{"value":103,"source":76,"evidence":104},"How does the Rust speed compare to the C version?",[105,108],{"id":106,"by":83,"text":107},"49180234","How do you find the speed of the Rust version of your FEC vs, the C version?",{"id":109,"by":110,"text":111},"49180942","johschmitz","Performance result are presented here as far as I understand: https:\u002F\u002Fgithub.com\u002Fbrian-armstrong\u002Ffec#performance",{"value":113,"source":76,"evidence":114},"Could a Rust version be used for goestools?",[115],{"id":98,"by":99,"text":100},[117,121],{"value":118,"source":76,"evidence":119},"libfec",[120],{"id":68,"by":11,"text":69},{"value":122,"source":76,"evidence":123},"goestools",[124],{"id":98,"by":99,"text":100},{"comments":126,"answered":126,"key":127},4,[128,131,134],{"id":129,"text":130},"49189925","Interesting. I'll have to give it a try. If I understand your suggestion, you're saying that rather than doing 2 lookups for logs, then an addition, and then another lookup to…",{"id":132,"text":133},"49178583","You could certainly call this crate through a shim in goestools but you'd have to add a Rust dependency. But you could also rewrite goestools in Rust, though it wouldn't be a…",{"id":68,"text":69},{"commenters":136,"max_depth":137,"maker_replies":126,"first_comment_mins":138,"lifespan_hours":18},6,7,156,[140,142,143,145,147,149,150,153,155,157,158],[91,34,33,141,92,34],"project\u002Fneutral\u002Fexecution",[129,34,34,141,11,39],[98,39,35,144,99,34],"project\u002Fpositive\u002Fidea",[132,39,34,146,11,39],"project\u002Fneutral\u002Fidea",[106,39,33,148,83,34],"project\u002Fneutral\u002Fperformance",[68,39,34,148,11,39],[151,39,34,152,83,34],"49180659","commenter\u002Fneutral\u002Fnone",[79,39,34,154,11,39],"project\u002Fpositive\u002Fperformance",[82,39,35,156,83,34],"maker\u002Fpositive\u002Fnone",[109,39,33,148,110,34],[159,32,34,160,161,34],"49177425","other\u002Fneutral\u002Fnone","ChadNauseam",[],[164,169,174,178,183,188],{"id":165,"name":166,"points":167,"category":168},"49124218","Elevators",1680,"learning_science",{"id":170,"name":171,"points":172,"category":173},"49170165","Inclusive Color Space",627,"creative",{"id":175,"name":176,"points":177,"category":173},"49149966","Isopolis",350,{"id":179,"name":180,"points":181,"category":182},"49140396","Cycloidal Gearbox",338,"hardware",{"id":184,"name":185,"points":186,"category":187},"49158333","Swiftlet",312,"ai",{"id":189,"name":190,"points":191,"category":192},"49145937","Kakehashi",255,"infrastructure",false,"v2",{"id":196,"name":5,"line":6,"ai":193,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":197,"top":18,"kw":198,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":199,"url":9,"mix":200,"praise":75,"objection":-1,"sub":21},49176212,0.23,[24,25,26,27,28],"30503000530",[32,33,34,34],1793991162642]