Skip to content

Commit

Permalink
Remove bench with base64 crate
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Jan 17, 2016
1 parent 46fc166 commit d47453c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

- Enhance performance by 15%.
- Document the commands to build the example and run the benchmarks.
- Compare performance with the `base64` crate.
- Add `generic` to the crate keywords.

## 1.1.1
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,4 @@ path = "examples/encode/main.rs"
# Used by the example.
getopts = "0.2.14"
# Used by the tests and benchmarks.
base64 = "0.1.1"
rustc-serialize = "0.3.16"
11 changes: 0 additions & 11 deletions benches/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

extern crate test;
extern crate rustc_serialize;
extern crate base64 as extern_base64;
extern crate data_encoding;

use test::Bencher;
Expand All @@ -29,11 +28,6 @@ fn rustc_encode(b: &mut Bencher) {
encode(b, |x| x.to_base64(STANDARD).into_bytes());
}

#[bench]
fn base64_encode(b: &mut Bencher) {
encode(b, |x| extern_base64::u8en(x).unwrap());
}

#[bench]
fn data_decode(b: &mut Bencher) {
decode(b, base64::decode);
Expand All @@ -43,8 +37,3 @@ fn data_decode(b: &mut Bencher) {
fn rustc_decode(b: &mut Bencher) {
decode(b, |x| x.from_base64());
}

#[bench]
fn base64_decode(b: &mut Bencher) {
decode(b, extern_base64::u8de);
}
4 changes: 0 additions & 4 deletions tests/diff.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
extern crate data_encoding;
extern crate rustc_serialize;
extern crate base64;

#[test]
fn difference() {
use data_encoding::base64::decode;
use data_encoding::decode::Error::*;
use rustc_serialize::base64::FromBase64;
use base64::u8de;
let x = b"AAB=";
assert_eq!(decode(x), Err(BadPadding));
assert_eq!(x.from_base64().unwrap(), vec![0, 0]);
assert_eq!(u8de(x).unwrap(), vec![0, 0]);
let x = b"AAA";
assert_eq!(decode(x), Err(BadLength));
assert_eq!(x.from_base64().unwrap(), vec![0, 0]);
assert_eq!(u8de(x).unwrap(), vec![0, 0]);
let x = b"A\rA\nB=";
assert_eq!(decode(x), Err(BadLength));
assert_eq!(x.from_base64().unwrap(), vec![0, 0]);
Expand Down

0 comments on commit d47453c

Please sign in to comment.