Improve performance of Rust's problem 48.