D7908: rust-filepatterns: improve API and robustness for pattern files parsing
Alphare (Raphaël Gomès)
phabricator at mercurial-scm.org
Thu Jan 16 15:19:04 EST 2020
Alphare added inline comments.
Alphare marked 2 inline comments as done.
> kevincox wrote in filepatterns.rs:237
> If you think it' is clearer that's fine. But I'm curious where "Rust might optimize iterators better than for loops" comes from. I did a quick test and it looks like the for loop actually generates slightly better code https://rust.godbolt.org/z/vFAWyZ
I might be using godbolt wrong but it looks like you are using different versions of rustc. When using 1.40 for both sides, I don't see any clear win on either side... but I'm not fluent in assembly either. As I'm sure you'll agree, this function is unlikely to show up in future profiles anyway.
CHANGES SINCE LAST ACTION
To: Alphare, #hg-reviewers, kevincox
Cc: durin42, kevincox, mercurial-devel
More information about the Mercurial-devel