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 +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ rustc-serialize = { version = "0.3", optional = true }
13
13
serde = { version = " 1.0" , features = [" derive" ], optional = true }
14
14
serde-bench = { version = " 0.0.7" , optional = true }
15
15
serde_json = { version = " 1.0" , optional = true }
16
- simd-json = { version = " 0.1 " , optional = true }
16
+ simd-json = { version = " 0.4 " , optional = true }
17
17
time = " 0.1"
18
18
19
19
[features ]
Original file line number Diff line number Diff line change 3
3
This is a partial port of [ nativejson-benchmark] to Rust. The libraries tested
4
4
are:
5
5
6
- - [ serde\_ json] 1.0.53
6
+ - [ serde\_ json] 1.0.72
7
7
- [ json-rust] 0.12.4
8
8
- [ rustc-serialize] 0.3.24
9
- - [ simd-json] 0.1.26 (this requires a modern x86 CPU for good results)
9
+ - [ simd-json] 0.4.11 (this requires a modern x86 CPU for good results)
10
10
11
11
[ nativejson-benchmark ] : https://github.com/miloyip/nativejson-benchmark
12
12
[ serde\_ json ] : https://github.com/serde-rs/json
@@ -34,9 +34,9 @@ data/citm_catalog.json 210 MB/s 180 MB/s 140 MB/s 210 MB/s
34
34
data/twitter.json 120 MB/s 330 MB/s 87 MB/s 350 MB/s
35
35
36
36
======= simd-json ======== parse|stringify ===== parse|stringify ====
37
- data/canada.json 370 MB/s 440 MB/s 600 MB/s
38
- data/citm_catalog.json 920 MB/s 670 MB/s 1400 MB/s
39
- data/twitter.json 790 MB/s 880 MB/s 980 MB/s
37
+ data/canada.json 380 MB/s 470 MB/s 580 MB/s
38
+ data/citm_catalog.json 720 MB/s 760 MB/s 1220 MB/s
39
+ data/twitter.json 810 MB/s 890 MB/s 1050 MB/s
40
40
```
41
41
42
42
- Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz * (laptop CPU from 2015)*
Original file line number Diff line number Diff line change @@ -164,10 +164,10 @@ macro_rules! bench_file_simd_json {
164
164
let mut data = contents. clone( ) ;
165
165
let dom = simd_json_parse_dom( & mut data) . unwrap( ) ;
166
166
let dur = timer:: bench_with_buf( num_trials, len, |out| {
167
- dom . write( out) . unwrap( )
167
+ simd_json :: Writable :: write( & dom , out) . unwrap( )
168
168
} ) ;
169
169
let mut serialized = Vec :: new( ) ;
170
- dom . write( & mut serialized) . unwrap( ) ;
170
+ simd_json :: Writable :: write( & dom , & mut serialized) . unwrap( ) ;
171
171
print!( "{:6} MB/s" , throughput( dur, serialized. len( ) ) ) ;
172
172
io:: stdout( ) . flush( ) . unwrap( ) ;
173
173
}
You can’t perform that action at this time.
0 commit comments