Life with Web Browser Engine (Gecko, WebKit and etc), Mobile and etc.
Iteratorトレイトにsize_hintというメソッドがあるけど、Iterator.collect()でVecにするときは、このsize_hintを実装するかしないかでVecの初期キャパシティが決まるので、collectのパフォーマンスに影響があるということを今日初めて知った。
Ref: https://github.com/unicode-org/icu4x/pull/6764 / https://bugzilla.mozilla.org/show_bug.cgi?id=1974993