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
{{ message }}
Repository navigation
Vec<u8> clone in rustc 1.33.0 is 3 times slower than rustc 1.29.0 #57437
changed the title [-]&[u8] clone in rustc 1.33.0 is 50% slower than rustc 1.29.0[/-][+]Vec<u8> clone in rustc 1.33.0 is 3 times slower than rustc 1.29.0[/+]on Jan 8, 2019
@ollie27 Oh very good guess. That would explain a lot. I do think that @breeswish's benchmarks are running against system malloc in the 'after' run. We are running at least one set of benchmarks with jemalloc both before/after: https://gist.github.com/brson/13586d9f12f3af5c8377628c3d0f12d0#file-benchcmp-tikv and have seen regressions there too, but not investigated.
We'll fix our side to make sure we are comparing jemalloc to jemalloc then see how our benchmarks look.
What I reported yesterday about not comparing allocator to allocator looks to be incorrect. @breeswish's benchmarks may have been using the same jemalloc. Still investigating.
Hi @mati865 My OS is MacOS 10.12.6. I will try again with jemalloc linked. During that, you may first view a result powered by Travis CI (although it may not be very stable, but still referable): https://travis-ci.com/breeswish/vec_clone_play
Activity
killercup commentedon Jan 8, 2019
Can you try this? #47745 (comment)
[-]&[u8] clone in rustc 1.33.0 is 50% slower than rustc 1.29.0[/-][+]Vec<u8> clone in rustc 1.33.0 is 3 times slower than rustc 1.29.0[/+]breezewish commentedon Jan 8, 2019
@killercup
Hi, I tried with the following profile:
and
the outcome is similar.
ollie27 commentedon Jan 8, 2019
I'd guess this is due to #55238. You could try using jemallocator to confirm.
brson commentedon Jan 8, 2019
@ollie27 Oh very good guess. That would explain a lot. I do think that @breeswish's benchmarks are running against system malloc in the 'after' run. We are running at least one set of benchmarks with jemalloc both before/after: https://gist.github.com/brson/13586d9f12f3af5c8377628c3d0f12d0#file-benchcmp-tikv and have seen regressions there too, but not investigated.
We'll fix our side to make sure we are comparing jemalloc to jemalloc then see how our benchmarks look.
brson commentedon Jan 9, 2019
What I reported yesterday about not comparing allocator to allocator looks to be incorrect. @breeswish's benchmarks may have been using the same jemalloc. Still investigating.
mati865 commentedon Jan 10, 2019
What is your system?
Since switch system allocator I'm seeing small performance increase on 3 systems with glibc 2.28 (Arch Linux, Fedora and Ubuntu).
With your benchmark I was getting results so close they weren't reliable.
These are results with
let raw = vec![0u8; 1000000];:breezewish commentedon Jan 10, 2019
Hi @mati865 My OS is MacOS 10.12.6. I will try again with jemalloc linked. During that, you may first view a result powered by Travis CI (although it may not be very stable, but still referable): https://travis-ci.com/breeswish/vec_clone_play
mati865 commentedon Jan 10, 2019
@breeswish I don't use macOS so I cannot speak for it but for such old Linux distributions jemallocator should fix the performance.
brson commentedon Jan 23, 2019
After further investigation, there indeed wasn't a problem with
Vec<u8>, so this can be closed.breezewish commentedon Jan 23, 2019
I forced to use jemalloc and discovered that there is no notable difference in the case reported by this issue. So closing.