reedlepee
|
ad465441ba
|
Removed Unnecessary comments and white spaces #4386
|
2013-10-23 01:10:50 +05:30 |
|
reedlepee
|
0ada7c7ffe
|
Making fields in std and extra : private #4386
|
2013-10-23 01:10:50 +05:30 |
|
Daniel Micay
|
4e161a4d40
|
switch Drop to &mut self
|
2013-09-16 22:19:23 -04:00 |
|
Alex Crichton
|
e3662b1880
|
Remove offset_inbounds for an unsafe offset function
|
2013-08-27 23:22:52 -07:00 |
|
Niko Matsakis
|
0479d946c8
|
Add externfn macro and correctly label fixed_stack_segments
|
2013-08-19 07:13:15 -04:00 |
|
Daniel Micay
|
ef870d37a5
|
implement pointer arithmetic with GEP
Closes #8118, #7136
~~~rust
extern mod extra;
use std::vec;
use std::ptr;
fn bench_from_elem(b: &mut extra::test::BenchHarness) {
do b.iter {
let v: ~[u8] = vec::from_elem(1024, 0u8);
}
}
fn bench_set_memory(b: &mut extra::test::BenchHarness) {
do b.iter {
let mut v: ~[u8] = vec::with_capacity(1024);
unsafe {
let vp = vec::raw::to_mut_ptr(v);
ptr::set_memory(vp, 0, 1024);
vec::raw::set_len(&mut v, 1024);
}
}
}
fn bench_vec_repeat(b: &mut extra::test::BenchHarness) {
do b.iter {
let v: ~[u8] = ~[0u8, ..1024];
}
}
~~~
Before:
test bench_from_elem ... bench: 415 ns/iter (+/- 17)
test bench_set_memory ... bench: 85 ns/iter (+/- 4)
test bench_vec_repeat ... bench: 83 ns/iter (+/- 3)
After:
test bench_from_elem ... bench: 84 ns/iter (+/- 2)
test bench_set_memory ... bench: 84 ns/iter (+/- 5)
test bench_vec_repeat ... bench: 84 ns/iter (+/- 3)
|
2013-07-30 02:50:31 -04:00 |
|
Luqman Aden
|
ca2966c6d0
|
Change finalize -> drop.
|
2013-06-25 21:14:39 -04:00 |
|
Daniel Micay
|
e900dba28a
|
rename the Ptr trait to RawPtr
Closes #6607
|
2013-06-03 13:50:29 -04:00 |
|
Patrick Walton
|
5fb254695b
|
Remove all uses of pub impl. rs=style
|
2013-06-01 09:18:27 -07:00 |
|
Patrick Walton
|
0c820d4123
|
libstd: Rename libcore to libstd and libstd to libextra; update makefiles.
This only changes the directory names; it does not change the "real"
metadata names.
|
2013-05-22 21:57:05 -07:00 |
|