srenevey / ode-solvers

Numerical methods to solve ordinary differential equations in Rust.
BSD 3-Clause "New" or "Revised" License
64 stars 26 forks source link

Using Buffer for output writing. #8

Closed ZuseZ4 closed 2 years ago

ZuseZ4 commented 2 years ago

I've been using this crate for a lorenz-96 system and noticed that the runtime is easily dominated by the time it takes to write the results into a file. Given that you already named your variable buf and that other users will probably run into the same issue when starting at the examples, I just went ahead and added it to all examples. It's not that necessary for the examples themselves and it's adding 5 lines per example, so feel free to reject it if you want to keep them minimal.