You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like there's a good chance this is related to me moving vector append into the library. I'm making a few tweaks now that should improve performance.
Actually, after looking at the graphs some more, it looks like my change isn't responsible for the latest perf regression. That said, there's still a few v += [x] expressions that can be replaced with push(v, x).
I just did a grep for += [ over the whole tree, and there are still a lot of singleton vector appends to track down. This should win back the perf we lost on rustc.
How hard would it be to let us pass self by - or +? This seems like a better long term fix than telling everyone just to use vec::push.
@msullivan just pointed out that vec::push_all and vec::append are doing a lot of unnecessary bounds checks that could probably be removed using unsafe code. This could gain some of our speed back.
The perf bots are still showing that we're about 5 seconds behind where we used to be on rustc. There's definitely more work to do, but to me the performance is tolerable again.
I can keep trying to win back those 5 seconds if people don't want to take the hit.
Activity
eholk commentedon Jun 25, 2012
It seems like there's a good chance this is related to me moving vector append into the library. I'm making a few tweaks now that should improve performance.
eholk commentedon Jun 25, 2012
Actually, after looking at the graphs some more, it looks like my change isn't responsible for the latest perf regression. That said, there's still a few
v += [x]expressions that can be replaced withpush(v, x).Improved graph500 performance (Issue #2719)
Improved perf for msgsend (Issue #2719)
Some perf fixes, although vec::slice is still too slow (Issue #2719)
vec::slice is faster now (Issue #2719)
msullivan commentedon Jun 26, 2012
Tracked it down. It looks like the libcore vector code was (accidentally) not getting called until my patch landed.
So the regression is due to moving vec append to the library, and the extra copies that causes.
eholk commentedon Jun 26, 2012
I just did a grep for
+= [over the whole tree, and there are still a lot of singleton vector appends to track down. This should win back the perf we lost on rustc.How hard would it be to let us pass
selfby-or+? This seems like a better long term fix than telling everyone just to usevec::push.The issue for allowing modes on
selfis #2585.Getting rid of lots more vector +=. (issue #2719)
pcwalton commentedon Jun 26, 2012
I think dvec is probably the real long-term fix, no?
More perf tweaks (issue #2719)
eholk commentedon Jun 26, 2012
@msullivan just pointed out that
vec::push_allandvec::appendare doing a lot of unnecessary bounds checks that could probably be removed using unsafe code. This could gain some of our speed back.Remove unnecessary bounds checks in vec::push_all (issue #2719)
Removed pretty much all the vector+ from core (issue #2719)
vec::append reuses its left hand side when possible. (issue #2719)
Replace more vector additions (issue #2719)
Replace more vector + (issue #2719)
catamorphism commentedon Jun 28, 2012
@eholk and @msullivan : is this resolved for now?
eholk commentedon Jun 28, 2012
The perf bots are still showing that we're about 5 seconds behind where we used to be on rustc. There's definitely more work to do, but to me the performance is tolerable again.
I can keep trying to win back those 5 seconds if people don't want to take the hit.
replace more vector + (issue #2719)
Replaced almost all vector+ in rustc (#2719)
eholk commentedon Jun 29, 2012
I replaced pretty much all the calls to + with various append, push, push_all, append_one calls, and now rustc is faster than it was before.
brson commentedon Jun 29, 2012
Nice work @eholk!
Auto merge of rust-lang#2719 - RalfJung:rustup, r=RalfJung
Auto merge of rust-lang#2719 - RalfJung:rustup, r=RalfJung
Unified handling for unstable command line flags across compiler and …
Merge pull request rust-lang#2719 from xonx4l/const_generics_docs
Merge rust-lang#4207 rust-lang#4253