Skip to content
This repository was archived by the owner on May 20, 2024. It is now read-only.

Commit de23484

Browse files
authored
Merge pull request #22 from ecton/remove-json-rust
Remove json-rust from the suite
2 parents 541d449 + 4791d04 commit de23484

File tree

3 files changed

+1
-34
lines changed

3 files changed

+1
-34
lines changed

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ publish = false
88
[dependencies]
99
getopts = "0.2"
1010
jemallocator = "0.5"
11-
json = { version = "0.12", optional = true }
1211
rustc-serialize = { version = "0.3", optional = true }
1312
serde = { version = "1.0", features = ["derive"], optional = true }
1413
serde_json = { version = "1.0", optional = true }
@@ -17,12 +16,11 @@ time = "0.3"
1716

1817
[features]
1918
default = ["performance", "all-libs", "all-files"]
20-
all-libs = ["lib-serde", "lib-json-rust", "lib-rustc-serialize", "lib-simd-json"]
19+
all-libs = ["lib-serde", "lib-rustc-serialize", "lib-simd-json"]
2120
all-files = ["file-canada", "file-citm-catalog", "file-twitter"]
2221
performance = ["parse-dom", "stringify-dom", "parse-struct", "stringify-struct"]
2322
lib-serde = ["serde", "serde_json"]
2423
lib-simd-json = ["serde", "simd-json"]
25-
lib-json-rust = ["json"]
2624
lib-rustc-serialize = ["rustc-serialize"]
2725
file-canada = []
2826
file-citm-catalog = []

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ This is a partial port of [nativejson-benchmark] to Rust. The libraries tested
44
are:
55

66
- [serde\_json] 1.0.72
7-
- [json-rust] 0.12.4
87
- [rustc-serialize] 0.3.24
98
- [simd-json] 0.4.11 (this requires a modern x86 CPU for good results)
109

1110
[nativejson-benchmark]: https://github.com/miloyip/nativejson-benchmark
1211
[serde\_json]: https://github.com/serde-rs/json
13-
[json-rust]: https://github.com/maciejhirsz/json-rust
1412
[rustc-serialize]: https://github.com/rust-lang-nursery/rustc-serialize
1513
[simd-json]: https://github.com/Licenser/simdjson-rs
1614

@@ -23,11 +21,6 @@ data/canada.json 320 MB/s 430 MB/s 580 MB/s 310 MB/s
2321
data/citm_catalog.json 420 MB/s 560 MB/s 710 MB/s 880 MB/s
2422
data/twitter.json 300 MB/s 910 MB/s 550 MB/s 1060 MB/s
2523
26-
======= json-rust ======== parse|stringify ===== parse|stringify ====
27-
data/canada.json 390 MB/s 840 MB/s
28-
data/citm_catalog.json 520 MB/s 780 MB/s
29-
data/twitter.json 430 MB/s 1030 MB/s
30-
3124
==== rustc_serialize ===== parse|stringify ===== parse|stringify ====
3225
data/canada.json 150 MB/s 67 MB/s 120 MB/s 46 MB/s
3326
data/citm_catalog.json 210 MB/s 180 MB/s 140 MB/s 210 MB/s

src/main.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,6 @@ fn main() {
210210
stringify_struct: serde_json::to_writer,
211211
}
212212

213-
#[cfg(feature = "lib-json-rust")]
214-
bench! {
215-
name: "json-rust",
216-
bench: bench_file,
217-
dom: json::JsonValue,
218-
parse_dom: json_rust_parse_dom,
219-
stringify_dom: json_rust_stringify_dom,
220-
}
221-
222213
#[cfg(feature = "lib-rustc-serialize")]
223214
bench! {
224215
name: "rustc_serialize",
@@ -260,21 +251,6 @@ where
260251
serde_json::from_str(s)
261252
}
262253

263-
#[cfg(all(
264-
feature = "lib-json-rust",
265-
any(feature = "parse-dom", feature = "stringify-dom")
266-
))]
267-
fn json_rust_parse_dom(bytes: &[u8]) -> json::Result<json::JsonValue> {
268-
use std::str;
269-
let s = str::from_utf8(bytes).unwrap();
270-
json::parse(&s)
271-
}
272-
273-
#[cfg(all(feature = "lib-json-rust", feature = "stringify-dom"))]
274-
fn json_rust_stringify_dom<W: io::Write>(write: &mut W, dom: &json::JsonValue) -> io::Result<()> {
275-
dom.write(write)
276-
}
277-
278254
#[cfg(all(
279255
feature = "lib-rustc-serialize",
280256
any(feature = "parse-dom", feature = "stringify-dom")

0 commit comments

Comments
 (0)