Skip to content

Commit f5e89a0

Browse files
author
blake2-ppc
committed
---
yaml --- r: 145167 b: refs/heads/try2 c: e34e203 h: refs/heads/master i: 145165: c6015c6 145163: 46abf4f 145159: e836b0e 145151: 11e21e0 v: v3
1 parent 4095412 commit f5e89a0

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 8fce135326707264d99102cdb514b00d6aa38081
8+
refs/heads/try2: e34e2032e8ca028fb622b60ad4aa07f9e86bfe35
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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)