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
8
8
[dependencies ]
9
9
getopts = " 0.2"
10
10
jemallocator = " 0.5"
11
- json = { version = " 0.12" , optional = true }
12
11
rustc-serialize = { version = " 0.3" , optional = true }
13
12
serde = { version = " 1.0" , features = [" derive" ], optional = true }
14
13
serde_json = { version = " 1.0" , optional = true }
@@ -17,12 +16,11 @@ time = "0.3"
17
16
18
17
[features ]
19
18
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" ]
21
20
all-files = [" file-canada" , " file-citm-catalog" , " file-twitter" ]
22
21
performance = [" parse-dom" , " stringify-dom" , " parse-struct" , " stringify-struct" ]
23
22
lib-serde = [" serde" , " serde_json" ]
24
23
lib-simd-json = [" serde" , " simd-json" ]
25
- lib-json-rust = [" json" ]
26
24
lib-rustc-serialize = [" rustc-serialize" ]
27
25
file-canada = []
28
26
file-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
4
4
are:
5
5
6
6
- [ serde\_ json] 1.0.72
7
- - [ json-rust] 0.12.4
8
7
- [ rustc-serialize] 0.3.24
9
8
- [ simd-json] 0.4.11 (this requires a modern x86 CPU for good results)
10
9
11
10
[ nativejson-benchmark ] : https://github.com/miloyip/nativejson-benchmark
12
11
[ serde\_ json ] : https://github.com/serde-rs/json
13
- [ json-rust ] : https://github.com/maciejhirsz/json-rust
14
12
[ rustc-serialize ] : https://github.com/rust-lang-nursery/rustc-serialize
15
13
[ simd-json ] : https://github.com/Licenser/simdjson-rs
16
14
@@ -23,11 +21,6 @@ data/canada.json 320 MB/s 430 MB/s 580 MB/s 310 MB/s
23
21
data/citm_catalog.json 420 MB/s 560 MB/s 710 MB/s 880 MB/s
24
22
data/twitter.json 300 MB/s 910 MB/s 550 MB/s 1060 MB/s
25
23
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
-
31
24
==== rustc_serialize ===== parse|stringify ===== parse|stringify ====
32
25
data/canada.json 150 MB/s 67 MB/s 120 MB/s 46 MB/s
33
26
data/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() {
210
210
stringify_struct: serde_json:: to_writer,
211
211
}
212
212
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
-
222
213
#[ cfg( feature = "lib-rustc-serialize" ) ]
223
214
bench ! {
224
215
name: "rustc_serialize" ,
@@ -260,21 +251,6 @@ where
260
251
serde_json:: from_str ( s)
261
252
}
262
253
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
-
278
254
#[ cfg( all(
279
255
feature = "lib-rustc-serialize" ,
280
256
any( feature = "parse-dom" , feature = "stringify-dom" )
You can’t perform that action at this time.
0 commit comments