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

Commit c8bf3ee

Browse files
committed
Update crates
1 parent fef886d commit c8bf3ee

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ rustc-serialize = { version = "0.3", optional = true }
1313
serde = { version = "1.0", features = ["derive"], optional = true }
1414
serde-bench = { version = "0.0.7", optional = true }
1515
serde_json = { version = "1.0", optional = true }
16-
simd-json = { version = "0.1", optional = true}
16+
simd-json = { version = "0.4", optional = true}
1717
time = "0.1"
1818

1919
[features]

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
This is a partial port of [nativejson-benchmark] to Rust. The libraries tested
44
are:
55

6-
- [serde\_json] 1.0.53
6+
- [serde\_json] 1.0.72
77
- [json-rust] 0.12.4
88
- [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)
1010

1111
[nativejson-benchmark]: https://github.com/miloyip/nativejson-benchmark
1212
[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
3434
data/twitter.json 120 MB/s 330 MB/s 87 MB/s 350 MB/s
3535
3636
======= 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
4040
```
4141

4242
- Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz *(laptop CPU from 2015)*

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,10 @@ macro_rules! bench_file_simd_json {
164164
let mut data = contents.clone();
165165
let dom = simd_json_parse_dom(&mut data).unwrap();
166166
let dur = timer::bench_with_buf(num_trials, len, |out| {
167-
dom.write(out).unwrap()
167+
simd_json::Writable::write(&dom, out).unwrap()
168168
});
169169
let mut serialized = Vec::new();
170-
dom.write(&mut serialized).unwrap();
170+
simd_json::Writable::write(&dom, &mut serialized).unwrap();
171171
print!("{:6} MB/s", throughput(dur, serialized.len()));
172172
io::stdout().flush().unwrap();
173173
}

0 commit comments

Comments
 (0)