Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 15 pull requests #39613

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
108293d
Added Default impl to PathBuf
Jan 1, 2017
6d9f359
Add i686-unknown-netbsdelf target
jakllsch Jan 23, 2017
5c9fdd1
doc comment rewording
king6cong Feb 3, 2017
e866d07
lint/ctypes: Don't warn on non-unsized structs with PhantomData.
emilio Feb 2, 2017
8579218
Improve error message for uninferrable types #38812
cengiz-io Jan 24, 2017
89ae2ca
Remove extra newlines from expectation files
cengiz-io Jan 24, 2017
7aff6ad
Remove extra note and revert name in message
cengiz-io Jan 25, 2017
3fa28cb
Add a new ui test and update existing ones
cengiz-io Feb 2, 2017
380ba6d
go back to use //
king6cong Feb 6, 2017
7c8c45e
Extract collections benchmarks to libcollections/benches
phungleson Feb 6, 2017
b975786
regr test
nikomatsakis Feb 6, 2017
78f542b
Rename i686-unknown-netbsdelf target to i686-unknown-netbsd
jakllsch Feb 6, 2017
fa0a728
back: Limit the number of LLVM worker threads.
michaelwoerister Feb 6, 2017
4f5fc4e
fix case where some edges can't be recreated by expanding the graph
nikomatsakis Feb 6, 2017
7c2752a
rustbuild: support setting verbosity in config.toml
Keruspe Feb 6, 2017
1ee88e5
A few documentation improvements for `syntax::print::pp`
bjorn3 Feb 5, 2017
4268872
rustbuild: add verbose to config.toml.example
Keruspe Feb 6, 2017
19bbd85
Fix branch name Cargo's downloaded from
alexcrichton Feb 5, 2017
bf126d2
Fix a manifest-generation bug on beta
alexcrichton Feb 6, 2017
235741f
liblibc: Update to include aarch64-unknown-freebsd support
dumbbell Feb 6, 2017
ddb0a78
Unignore u128 test for stage 0,1
est31 Feb 7, 2017
df73bc9
Fix ICE when accessing mutably an immutable enum
estebank Feb 6, 2017
c9eaa66
Rollup merge of #38764 - Aaronepower:master, r=aturon
frewsxcv Feb 7, 2017
c125b88
Rollup merge of #39361 - cengizIO:master, r=arielb1
frewsxcv Feb 7, 2017
fae92d8
Rollup merge of #39426 - jakllsch:netbsd-c, r=alexcrichton
frewsxcv Feb 7, 2017
9995b13
Rollup merge of #39462 - emilio:improper-ctypes, r=nikomatsakis
frewsxcv Feb 7, 2017
76f8873
Rollup merge of #39482 - king6cong:master, r=frewsxcv
frewsxcv Feb 7, 2017
cf7fbb7
Rollup merge of #39557 - bjorn3:pp-docs, r=jseyfried
frewsxcv Feb 7, 2017
2762b4d
Rollup merge of #39561 - phungleson:libcollectionsbench, r=alexcrichton
frewsxcv Feb 7, 2017
763d342
Rollup merge of #39582 - nikomatsakis:incr-comp-issue-39569, r=michae…
frewsxcv Feb 7, 2017
0deb522
Rollup merge of #39583 - michaelwoerister:limit-llvm-threads, r=nikom…
frewsxcv Feb 7, 2017
b5e4745
Rollup merge of #39587 - Keruspe:master, r=alexcrichton
frewsxcv Feb 7, 2017
985b050
Rollup merge of #39598 - alexcrichton:cargo-branch, r=brson
frewsxcv Feb 7, 2017
35ec4ba
Rollup merge of #39599 - alexcrichton:cargo-tarball-name, r=brson
frewsxcv Feb 7, 2017
20e2e0e
Rollup merge of #39601 - dumbbell:update-liblibc-to-include-aarch64-u…
frewsxcv Feb 7, 2017
cfaedd2
Rollup merge of #39602 - estebank:fix-39544, r=eddyb
frewsxcv Feb 7, 2017
9d5dbeb
Rollup merge of #39604 - est31:i128_tests, r=alexcrichton
frewsxcv Feb 7, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions mk/cfg/i686-unknown-netbsd.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# rustbuild-only target
2 changes: 2 additions & 0 deletions src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ struct Build {
python: Option<String>,
full_bootstrap: Option<bool>,
extended: Option<bool>,
verbose: Option<usize>,
}

/// TOML representation of various global install decisions.
Expand Down Expand Up @@ -292,6 +293,7 @@ impl Config {
set(&mut config.vendor, build.vendor);
set(&mut config.full_bootstrap, build.full_bootstrap);
set(&mut config.extended, build.extended);
set(&mut config.verbose, build.verbose);

if let Some(ref install) = toml.install {
config.prefix = install.prefix.clone().map(PathBuf::from);
Expand Down
3 changes: 3 additions & 0 deletions src/bootstrap/config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@
# disabled by default.
#extended = false

# Verbosity level: 0 == not verbose, 1 == verbose, 2 == very verbose
#verbose = 0

# =============================================================================
# General install configuration options
# =============================================================================
Expand Down
4 changes: 1 addition & 3 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,7 @@ pub fn cargo(build: &Build, stage: u32, target: &str) {

let branch = match &build.config.channel[..] {
"stable" |
"beta" => {
build.release.split(".").take(2).collect::<Vec<_>>().join(".")
}
"beta" => format!("rust-{}", build.release_num),
_ => "master".to_string(),
};

Expand Down
7 changes: 3 additions & 4 deletions src/libcollections/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ std_unicode = { path = "../libstd_unicode" }
name = "collectionstest"
path = "../libcollectionstest/lib.rs"

# FIXME: need to extract benchmarks to separate crate
#[[bench]]
#name = "collectionstest"
#path = "../libcollectionstest/lib.rs"
[[bench]]
name = "collectionsbenches"
path = "../libcollections/benches/lib.rs"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -8,13 +8,17 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.


use std::iter::Iterator;
use std::vec::Vec;
use std::collections::BTreeMap;
use std::__rand::{Rng, thread_rng};
use test::{Bencher, black_box};

macro_rules! map_insert_rand_bench {
($name: ident, $n: expr, $map: ident) => (
#[bench]
pub fn $name(b: &mut ::test::Bencher) {
use std::__rand::{thread_rng, Rng};
use test::black_box;

pub fn $name(b: &mut Bencher) {
let n: usize = $n;
let mut map = $map::new();
// setup
Expand All @@ -39,9 +43,7 @@ macro_rules! map_insert_rand_bench {
macro_rules! map_insert_seq_bench {
($name: ident, $n: expr, $map: ident) => (
#[bench]
pub fn $name(b: &mut ::test::Bencher) {
use test::black_box;

pub fn $name(b: &mut Bencher) {
let mut map = $map::new();
let n: usize = $n;
// setup
Expand All @@ -64,12 +66,7 @@ macro_rules! map_insert_seq_bench {
macro_rules! map_find_rand_bench {
($name: ident, $n: expr, $map: ident) => (
#[bench]
pub fn $name(b: &mut ::test::Bencher) {
use std::iter::Iterator;
use std::__rand::{thread_rng, Rng};
use std::vec::Vec;
use test::black_box;

pub fn $name(b: &mut Bencher) {
let mut map = $map::new();
let n: usize = $n;

Expand Down Expand Up @@ -97,9 +94,7 @@ macro_rules! map_find_rand_bench {
macro_rules! map_find_seq_bench {
($name: ident, $n: expr, $map: ident) => (
#[bench]
pub fn $name(b: &mut ::test::Bencher) {
use test::black_box;

pub fn $name(b: &mut Bencher) {
let mut map = $map::new();
let n: usize = $n;

Expand All @@ -118,3 +113,45 @@ macro_rules! map_find_seq_bench {
}
)
}

map_insert_rand_bench!{insert_rand_100, 100, BTreeMap}
map_insert_rand_bench!{insert_rand_10_000, 10_000, BTreeMap}

map_insert_seq_bench!{insert_seq_100, 100, BTreeMap}
map_insert_seq_bench!{insert_seq_10_000, 10_000, BTreeMap}

map_find_rand_bench!{find_rand_100, 100, BTreeMap}
map_find_rand_bench!{find_rand_10_000, 10_000, BTreeMap}

map_find_seq_bench!{find_seq_100, 100, BTreeMap}
map_find_seq_bench!{find_seq_10_000, 10_000, BTreeMap}

fn bench_iter(b: &mut Bencher, size: i32) {
let mut map = BTreeMap::<i32, i32>::new();
let mut rng = thread_rng();

for _ in 0..size {
map.insert(rng.gen(), rng.gen());
}

b.iter(|| {
for entry in &map {
black_box(entry);
}
});
}

#[bench]
pub fn iter_20(b: &mut Bencher) {
bench_iter(b, 20);
}

#[bench]
pub fn iter_1000(b: &mut Bencher) {
bench_iter(b, 1000);
}

#[bench]
pub fn iter_100000(b: &mut Bencher) {
bench_iter(b, 100000);
}
11 changes: 11 additions & 0 deletions src/libcollections/benches/btree/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

mod map;
24 changes: 24 additions & 0 deletions src/libcollections/benches/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(warnings)]

#![feature(rand)]
#![feature(test)]

extern crate test;

mod btree;
mod linked_list;
mod string;
mod str;
mod slice;
mod vec;
mod vec_deque;
87 changes: 87 additions & 0 deletions src/libcollections/benches/linked_list.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::collections::LinkedList;
use test::Bencher;

#[bench]
fn bench_collect_into(b: &mut Bencher) {
let v = &[0; 64];
b.iter(|| {
let _: LinkedList<_> = v.iter().cloned().collect();
})
}

#[bench]
fn bench_push_front(b: &mut Bencher) {
let mut m: LinkedList<_> = LinkedList::new();
b.iter(|| {
m.push_front(0);
})
}

#[bench]
fn bench_push_back(b: &mut Bencher) {
let mut m: LinkedList<_> = LinkedList::new();
b.iter(|| {
m.push_back(0);
})
}

#[bench]
fn bench_push_back_pop_back(b: &mut Bencher) {
let mut m: LinkedList<_> = LinkedList::new();
b.iter(|| {
m.push_back(0);
m.pop_back();
})
}

#[bench]
fn bench_push_front_pop_front(b: &mut Bencher) {
let mut m: LinkedList<_> = LinkedList::new();
b.iter(|| {
m.push_front(0);
m.pop_front();
})
}

#[bench]
fn bench_iter(b: &mut Bencher) {
let v = &[0; 128];
let m: LinkedList<_> = v.iter().cloned().collect();
b.iter(|| {
assert!(m.iter().count() == 128);
})
}
#[bench]
fn bench_iter_mut(b: &mut Bencher) {
let v = &[0; 128];
let mut m: LinkedList<_> = v.iter().cloned().collect();
b.iter(|| {
assert!(m.iter_mut().count() == 128);
})
}
#[bench]
fn bench_iter_rev(b: &mut Bencher) {
let v = &[0; 128];
let m: LinkedList<_> = v.iter().cloned().collect();
b.iter(|| {
assert!(m.iter().rev().count() == 128);
})
}
#[bench]
fn bench_iter_mut_rev(b: &mut Bencher) {
let v = &[0; 128];
let mut m: LinkedList<_> = v.iter().cloned().collect();
b.iter(|| {
assert!(m.iter_mut().rev().count() == 128);
})
}
Loading