The associated issue for comparing two u16s is interesting.<p><a href="https://github.com/rust-lang/rust/issues/140167">https://github.com/rust-lang/rust/issues/140167</a>
Oh this stuff is what’s prompting the ffmpeg Twitter account to make a stand against Rust <a href="https://x.com/ffmpeg/status/1924137645988356437?s=46" rel="nofollow">https://x.com/ffmpeg/status/1924137645988356437?s=46</a>
Intersting to see this article on the perfromance advantage of not having to zero buffers after this article 2 days ago: <a href="https://news.ycombinator.com/item?id=44032680">https://news.ycombinator.com/item?id=44032680</a>
All being equal codecs ought to be in WUFFS† rather than Rust, but I can well imagine that it's a much bigger lift to take something as complicated as dav1d and write the analogous WUFFS than to clean up the c2rust translation, if you said a thousand times harder I'd have no trouble believing that. I just think it's worth it for us as a civilisation.<p>† Or an equivalent special purpose language, but WUFFS is right there
You know it's a good post when it starts with a funny meme. Seems related to the recent discussion: <i>$20K Bounty Offered for Optimizing Rust Code in Rav1d AV1 Decoder</i> (memorysafety.org) | 108 comments | <a href="https://news.ycombinator.com/item?id=43982238">https://news.ycombinator.com/item?id=43982238</a>
Honestly its a little surprising the first optimization he found was something fairly obvious just by using perf. I thought they had discussed the zeroing buffers issue in the first post? The second optimization was definitely more involved/interesting but was still pointed at by perf. Don't underestimate that tool!
This is really fun. Is there anything stopping rustc from performing the transmute trick ?<p>Edit: If I had read the next paragraph, I'd have learn about [1] before commenting<p>[1] <a href="https://github.com/rust-lang/rust/issues/140167">https://github.com/rust-lang/rust/issues/140167</a>
I don't understand this project. dav1d is 99% assembly (x86_64/risc-v 64bits/etc) with very little simple and plain C as coordinating code.
There's something about real optimization stories that I find fascinating – particularly the detailed ones including step-by-step improvements and profiling to show how numbers got better. In some way, they are <i>satisfying</i> to read.<p>Nicholas Nethercote's "How to speed up the Rust compiler" writings[1] fall into this same category for me.<p>Any others?<p>[1] <a href="https://nnethercote.github.io/" rel="nofollow">https://nnethercote.github.io/</a>
AV1 is an amazing codec. I really hope it replaces proprietary codecs like h264 and h265. It has a similar, if not better, performance to h265 while being completely free. Currently on an Intel-based Macbook it is only supported in some browsers, however it seems that newer video cards from AMD, Nvidia, and Intel do include hardware decoders.