download IS slower than Go-lang

This commit is contained in:
Palash Tyagi 2024-11-08 17:10:38 +00:00
parent 28cda5aae5
commit 8ef47925d3
2 changed files with 7 additions and 1 deletions

View File

@ -83,11 +83,17 @@ impl JPMaQSDownload {
assert!(all_jpmaq_expressions(expressions.clone()));
let dqts_vec = self.get_expressions(expressions)?;
println!("Retrieved {} time series", dqts_vec.len());
let start = std::time::Instant::now();
let indicators = dqts_vec
.iter()
.flat_map(|dqts| dqts.get_timeseries_by_ticker())
.map(|tsv| JPMaQSIndicator::new(tsv))
.collect::<Result<Vec<JPMaQSIndicator>, Box<dyn Error>>>()?;
println!(
"Converted time series to indicators in {:?}",
start.elapsed()
);
Ok(indicators)
}

View File

@ -16,7 +16,7 @@ fn main() {
start.elapsed()
);
let num_ticks = 200;
let num_ticks = 1000;
let sel_tickers: Vec<String> = tickers
.iter()
.take(num_ticks)