greyblake / whatlang-rs

Natural language detection library for Rust. Try demo online: https://whatlang.org/
https://whatlang.org/
MIT License
969 stars 109 forks source link

simplify alphabet_calculate_scores #109

Closed egorgrachev closed 2 years ago

egorgrachev commented 2 years ago

Refactor alphabet_calculate_scores to use iterators instead of for loops; extract simple functions

greyblake commented 2 years ago

@egorgrachev Thank you for your work! Unfortunately after merging https://github.com/greyblake/whatlang-rs/pull/108 (which is enough hardcore performance optimization that does not improve readability, but almost 2x increases performance) this PR becomes mostly irrelevant. I am the one to blame for not being quick enough to do all the necessary reviews and incorporate PRs and give feedback. Sorry for this.