File tree Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Expand file tree Collapse file tree 3 files changed +39
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: e5cbede103fca018089b113ec35f0cf863df7106
2
+ refs/heads/master: 3d5fb470fb22dea6473fc1a4d265ce9494dd4120
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
5
5
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
Original file line number Diff line number Diff line change @@ -101,3 +101,22 @@ pub unsafe fn exchange_free_(ptr: *c_char) {
101
101
pub unsafe fn exchange_free ( ptr : * c_char ) {
102
102
free ( ptr as * c_void ) ;
103
103
}
104
+
105
+ #[ cfg( test) ]
106
+ mod bench {
107
+ use extra:: test:: BenchHarness ;
108
+
109
+ #[ bench]
110
+ fn alloc_owned_small ( bh : & mut BenchHarness ) {
111
+ do bh. iter {
112
+ ~10 ;
113
+ }
114
+ }
115
+
116
+ #[ bench]
117
+ fn alloc_owned_big ( bh : & mut BenchHarness ) {
118
+ do bh. iter {
119
+ ~[ 10 , ..1000 ] ;
120
+ }
121
+ }
122
+ }
Original file line number Diff line number Diff line change @@ -135,3 +135,22 @@ extern {
135
135
fn rust_boxed_region_free ( region : * BoxedRegion , box : * OpaqueBox ) ;
136
136
fn rust_current_boxed_region ( ) -> * BoxedRegion ;
137
137
}
138
+
139
+ #[ cfg( test) ]
140
+ mod bench {
141
+ use extra:: test:: BenchHarness ;
142
+
143
+ #[ bench]
144
+ fn alloc_managed_small ( bh : & mut BenchHarness ) {
145
+ do bh. iter {
146
+ @10 ;
147
+ }
148
+ }
149
+
150
+ #[ bench]
151
+ fn alloc_managed_big ( bh : & mut BenchHarness ) {
152
+ do bh. iter {
153
+ @[ 10 , ..1000 ] ;
154
+ }
155
+ }
156
+ }
You can’t perform that action at this time.
0 commit comments