Re:Rust Performance Pitfalls
by Animats on Thursday June 08, 2017 @01:46PM
(#14515776)
Right. The correct answer here is to convert external data into UTF-8 once and keep it that way. You're probably not going to become compute-bound, even if you're just reading in text and writing it out again. The UTF-8 check is linear time.
[ Parent
| on HN ]
Re:Rust Performance Pitfalls
by burntsushi on Thursday June 08, 2017 @01:57PM
(#14515848)
Most of the Rust programs I write are compute bound, and finding ways to avoid the separate UTF-8 validation step are critical to their performance.
That's because you write string search programs. Do those even need to run in UTF-8 space, as opposed to pure byte strings?