Use simd-json

This commit is contained in:
Joscha 2022-09-30 18:07:50 +02:00
parent c195fbb8d4
commit b1f2af9577
4 changed files with 114 additions and 1 deletions

View file

@ -18,7 +18,8 @@ pub fn ingest() -> io::Result<()> {
let mut n_links = 0;
for line in stdin.lines() {
let json_page = serde_json::from_str::<JsonPage>(&line?)?;
// let json_page = serde_json::from_str::<JsonPage>(&line?)?;
let json_page = simd_json::serde::from_str::<JsonPage>(&mut line?).unwrap();
n_pages += 1;
n_links += json_page.links.len();