Closed lpil closed 6 years ago
Have you tried running it in release mode with cargo run --release
? By default, cargo run
will compile the program in debug mode. In debug mode, Rust performs overflow checks on integer arithmetic. Decoding Flac involves a lot of integer arithmetic, therefore Claxon is quite a bit slower in debug mode than in release.
Gosh, now it runs in half a second. I feel very foolish! Thank you for your help :)
Hello!
First thank you for this library. I've found it very approachable as a Rust beginner :)
I've written some code that reads a Flac file into memory as a
Vec<f32>
based off one of the given examples.When I run this it takes longer than I would expect.
Here the given input file was 26MiB and it took 22 seconds to read it.
This is slower than I would expect, other programs (not written by me) on the same machine seem to be able to read the entire file in less than a second.
Have I made a mistake in my implementation here?
Thanks, Louis