sdroege / ebur128

Implementation of the EBU R128 loudness standard
MIT License
99 stars 16 forks source link

Optimize Rust implementation #5

Closed sdroege closed 4 years ago

sdroege commented 4 years ago
sdroege commented 4 years ago

For history I have a 22% improvement pending, but the main thing that will make a difference is speeding up the filter. That's considerably slower than the C implementation currently, and together with calc_gating_block() (which is about as fast as the C version) it's the main thing taking time.

sdroege commented 4 years ago

Actually the Rust implementation is as fast as the C one already when compiling with clang instead of gcc, sometimes marginally faster. With gcc it's sometimes marginally slower but otherwise equally fast. What is slower is the creation of the EburR128 instance in some modes, but in others it's faster... and that part doesn't really matter much in practice.

So while there might be some optimizations left worth doing, the port to Rust didn't cause any regressions in performance at least.