3 ms·
An unsafety bug in rust's stdlib
- kristianp 8y ago>> This change takes a concise and clear functional-style implementation and updates it to a long, complex, and apparently buggy imperative-style. >True, but the numbers in the PR indicate that the new version was faster as n grew. I don’t know how often > str::repeat is used, but — and this ties with the point you make about values — when I use standard library functions in Rust, I expect that they be as performant as is possible You'd think that the same algorithm as in the pull request could be written in a functional style too?