]> git.lizzy.rs Git - rust.git/commit
perf: Avoid creating a SmallVec if nothing changes during a fold
authorMarkus Westerlind <markus.westerlind@imperva.com>
Wed, 8 Jan 2020 22:13:56 +0000 (23:13 +0100)
committerMarkus Westerlind <markus.westerlind@imperva.com>
Wed, 8 Jan 2020 22:20:19 +0000 (23:20 +0100)
commita5657dbc43d84133bd95e5de178d68634973b1b3
treecf9ea54d17d6109b06d9518a8944c38fd261c104
parentf48e576756cd0c360e5522974fc8d5867b439092
perf: Avoid creating a SmallVec if nothing changes during a fold

Not sure if this helps but in theory it should be less work than what
the current micro optimization does for `ty::Predicate` lists.

(It would explain the overhead I am seeing from `perf`.)
src/librustc/ty/structural_impls.rs