We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some benchmarks on macOS (using a 23MB uncompressed CNF file):
This took ≈ 30 seconds:
instance.to_dimacs_path(filename)?;
This also took ≈ 30 seconds:
let mut f = File::create(filename)?; instance.to_dimacs(&mut f)?;
But this was only ≈ 0.2 seconds:
let f = File::create(filename)?; let mut f = BufWriter::new(f); instance.to_dimacs(&mut f)?;
It looks like to_dimacs_path should wrap things in BufWriter; now it is apparently doing just File::create + to_dimacs, which can be very slow.
to_dimacs_path
BufWriter
File::create
to_dimacs
The text was updated successfully, but these errors were encountered:
PS. While at it, I noticed that open_compressed_uncompressed_write uses a bit confusingly-named variable raw_reader.
open_compressed_uncompressed_write
raw_reader
Sorry, something went wrong.
perf: add BufWriter when writing to file
46aea5c
resolves #76
ddd6e61
0ea68ca
8799fd1
No branches or pull requests
Some benchmarks on macOS (using a 23MB uncompressed CNF file):
This took ≈ 30 seconds:
This also took ≈ 30 seconds:
But this was only ≈ 0.2 seconds:
It looks like
to_dimacs_path
should wrap things inBufWriter
; now it is apparently doing justFile::create
+to_dimacs
, which can be very slow.The text was updated successfully, but these errors were encountered: