move the benchmarks around a little
This commit is contained in:
parent
0729ca8648
commit
5cf3a35d65
|
@ -0,0 +1,15 @@
|
|||
#![feature(asm)]
|
||||
extern crate test;
|
||||
use test::Bencher;
|
||||
|
||||
#[bench]
|
||||
fn kernel_swap(b: &mut Bencher) {
|
||||
b.iter(|| unsafe {
|
||||
asm!("movq $$102, %rax\n\
|
||||
syscall"
|
||||
:
|
||||
:
|
||||
: "rax", "rcx"
|
||||
: "volatile");
|
||||
});
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
#![feature(unboxed_closures, default_type_params, asm)]
|
||||
#![feature(unboxed_closures, default_type_params, box_syntax)]
|
||||
extern crate test;
|
||||
extern crate libc;
|
||||
extern crate lwkt;
|
||||
|
@ -34,15 +34,3 @@ fn swap(b: &mut Bencher) {
|
|||
Context::swap(&mut native, &mut green);
|
||||
})
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn kernel_swap(b: &mut Bencher) {
|
||||
b.iter(|| unsafe {
|
||||
asm!("movq $$102, %rax\n\
|
||||
syscall"
|
||||
:
|
||||
:
|
||||
: "rax", "rcx"
|
||||
: "volatile");
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue