Why is calling my asm function from Rust slower than calling it from C?

This is a follow-up to making the rav1d video decoder 1% faster , where we compared profiler snapshots of rav1d (the Rust implementation) and dav1d (the C baseline) to find specific functions that were slower in the Rust implementation 1 . Today, we are going to pay off a small debt from that post: since dav1d and rav1d share the same hand-written assembly functions, we used them as anchors to…