slightly improve performance by replacing iterators with owning for loops

This commit is contained in:
2025-06-04 00:08:33 +02:00
parent 6d4ffa209a
commit 2f381d540b
5 changed files with 313 additions and 288 deletions

14
src/test.rs Normal file
View File

@@ -0,0 +1,14 @@
extern crate test;
#[cfg(test)]
mod tests {
use super::*;
use crate::response_deserializer;
use test::Bencher;
#[bench]
fn loops(b: &mut Bencher) {
let search_result = std::fs::read_to_string("test_data/search_result.json").unwrap();
b.iter(|| response_deserializer::deserializer(&search_result));
}
}