-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use reverse_bits intrinsic based on feature
- Loading branch information
1 parent
2fe98aa
commit 6e6772b
Showing
4 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,14 @@ | ||
language: rust | ||
rust: stable | ||
|
||
matrix: | ||
include: | ||
- rust: nightly | ||
env: FEATURES=reverse_bits | ||
- rust: nightly | ||
env: FEATURES='' | ||
- rust: stable | ||
- rust: beta | ||
|
||
script: | ||
- cargo build --features "$FEATURES" | ||
- cargo bench --features "$FEATURES" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#![feature(test)] | ||
|
||
extern crate vob; | ||
extern crate test; | ||
extern crate rand; | ||
|
||
use rand::Rng; | ||
use test::Bencher; | ||
use vob::*; | ||
|
||
|
||
#[bench] | ||
fn from_bytes(b: &mut Bencher) { | ||
let mut rng = rand::thread_rng(); | ||
let mut source = [0u8; 1024]; | ||
rng.fill(&mut source); | ||
|
||
b.iter(|| { | ||
Vob::from_bytes(&source) | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters