Skip to content

Commit a714585

Browse files
author
blake2-ppc
committed
---
yaml --- r: 80415 b: refs/heads/snap-stage3 c: e34e203 h: refs/heads/master i: 80413: 9685c7f 80411: 1e0a23d 80407: 9e8635d 80399: bab8273 80383: 52863ff v: v3
1 parent 81a110f commit a714585

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 3e1803f3af1adc1b2e5595650f6920f40bbedc2e
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8fce135326707264d99102cdb514b00d6aa38081
4+
refs/heads/snap-stage3: e34e2032e8ca028fb622b60ad4aa07f9e86bfe35
55
refs/heads/try: 71bebebc37fbb229877da88dde13c2f35913bd77
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/str.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3897,4 +3897,23 @@ mod bench {
38973897
with_capacity(100);
38983898
}
38993899
}
3900+
3901+
#[bench]
3902+
fn bench_push_str(bh: &mut BenchHarness) {
3903+
let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb";
3904+
do bh.iter {
3905+
let mut r = ~"";
3906+
r.push_str(s);
3907+
}
3908+
}
3909+
3910+
#[bench]
3911+
fn bench_connect(bh: &mut BenchHarness) {
3912+
let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb";
3913+
let sep = "→";
3914+
let v = [s, s, s, s, s, s, s, s, s, s];
3915+
do bh.iter {
3916+
assert_eq!(v.connect(sep).len(), s.len() * 10 + sep.len() * 9);
3917+
}
3918+
}
39003919
}

0 commit comments

Comments
 (0)