douweschulte / pdbtbx

A library to open/edit/save (crystallographic) Protein Data Bank (PDB) and mmCIF files in Rust.
https://crates.io/crates/pdbtbx
MIT License
49 stars 12 forks source link

Parsing performance #82

Closed DocKDE closed 2 years ago

DocKDE commented 2 years ago

In chain.rs the residues are now iterated over in reverse order so the loop will be broken out of earlier. This leads to a significant performance gain during parsing. Also some clippy lints

81

DocKDE commented 2 years ago

That was basically just an automatic clippy lint, I use those during my coding. I just updated to 1.59, possibly that got added there. Maybe I can come up with an idea how to reduce the number of necessary comparisons further, who knows...

douweschulte commented 2 years ago

Ahh 1.59 just launched that explains ;-)