Switch from simd-json back to serde_json
If I remember correctly, there wasn't any significant performance improvement, but I might be misremembering.
This commit is contained in:
parent
7a52c818fb
commit
32ce86682c
4 changed files with 2 additions and 328 deletions
|
|
@ -67,7 +67,7 @@ fn first_stage() -> io::Result<(AdjacencyList<PageInfo, LinkInfo>, Titles)> {
|
|||
|
||||
let stdin = BufReader::new(io::stdin());
|
||||
for (i, line) in stdin.lines().enumerate() {
|
||||
let json_page = simd_json::serde::from_slice::<JsonPage>(&mut line?.into_bytes()).unwrap();
|
||||
let json_page = serde_json::from_str::<JsonPage>(&line?).unwrap();
|
||||
|
||||
result.pages.push(Page {
|
||||
link_idx: result.links.len() as u32,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ pub fn run(datafile: &Path, articlesfile: &Path, language: &str) -> io::Result<(
|
|||
|
||||
let articlesbuf = BufReader::new(File::open(articlesfile)?);
|
||||
let articles: Vec<Article> =
|
||||
simd_json::from_reader(articlesbuf).expect("failed to parse articles file");
|
||||
serde_json::from_reader(articlesbuf).expect("failed to parse articles file");
|
||||
|
||||
let titles = articles
|
||||
.into_iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue