This repository was archived by the owner on May 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +1
-34
lines changed Expand file tree Collapse file tree 3 files changed +1
-34
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ publish = false
88[dependencies ]
99getopts = " 0.2"
1010jemallocator = " 0.5"
11- json = { version = " 0.12" , optional = true }
1211rustc-serialize = { version = " 0.3" , optional = true }
1312serde = { version = " 1.0" , features = [" derive" ], optional = true }
1413serde_json = { version = " 1.0" , optional = true }
@@ -17,12 +16,11 @@ time = "0.3"
1716
1817[features ]
1918default = [" 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" ]
2120all-files = [" file-canada" , " file-citm-catalog" , " file-twitter" ]
2221performance = [" parse-dom" , " stringify-dom" , " parse-struct" , " stringify-struct" ]
2322lib-serde = [" serde" , " serde_json" ]
2423lib-simd-json = [" serde" , " simd-json" ]
25- lib-json-rust = [" json" ]
2624lib-rustc-serialize = [" rustc-serialize" ]
2725file-canada = []
2826file-citm-catalog = []
Original file line number Diff line number Diff line change @@ -4,13 +4,11 @@ This is a partial port of [nativejson-benchmark] to Rust. The libraries tested
44are:
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
2321data/citm_catalog.json 420 MB/s 560 MB/s 710 MB/s 880 MB/s
2422data/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 ====
3225data/canada.json 150 MB/s 67 MB/s 120 MB/s 46 MB/s
3326data/citm_catalog.json 210 MB/s 180 MB/s 140 MB/s 210 MB/s
Original file line number Diff line number Diff 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" )
You can’t perform that action at this time.
0 commit comments