Closed sdroege closed 4 years ago
I don't have much bandwidth to spare for this right now, but if you put a branch somewhere then I could probably port a function or two when I have a minute...
Thanks, will do :) I have basic infrastructure (also for comparing correctness and performance) done and some functions ported, but need to clean things up a bit more first.
Actually I have most of it done already, just the actual input code is missing and plumbing.
Oh I forgot to link to the branch: https://github.com/sdroege/ebur128/tree/rustify
I have the filter almost done too, after that the next step would be to delete all remaining C code as that's mostly plumbing at that point.
Ok, this is all done now. Some obvious further optimizations to do but overall the two implementations are very close in performance (Rust is a bit slower, usually around 2%). On my machine they both give the same results (difference is less than 2 ULP), on travis tests are failing though which I'll have to investigate.
Also overall around -1000 SLOC for the whole implementation if ignoring the tests and bindgen generated FFI part.
This should be possible to do incrementally