]> git.lizzy.rs Git - rust.git/commit
Remove unnecessary allocations / clones during method lookup
authorBjörn Steinbrink <bsteinbr@gmail.com>
Sat, 31 May 2014 12:21:39 +0000 (14:21 +0200)
committerBjörn Steinbrink <bsteinbr@gmail.com>
Sat, 31 May 2014 12:58:12 +0000 (14:58 +0200)
commitcd844c5fb54913bced99a046230e9af7b3704c9e
treef436f41d808d6899440d487db91bfb89463b771b
parentff2bf58e9e0c1e7b154b88fc7ba8c52584e9f768
Remove unnecessary allocations / clones during method lookup

By dropping the intermediate vector that holds the relevant candidates
including duplicates and directly building the vector that has the
duplicates removed we can eliminate quite a few allocations. This
reduces the times for type checking by 5-10% (measured with libstd,
libsyntax and librustc).
src/librustc/middle/typeck/check/method.rs