I will try to implement the same optimizations in Rust in the upcoming weeks
UPD And we opened an issue :) https://github.com/rust-lang/compiler-builtins/issues/368