Small stuff

This commit is contained in:
2026-01-30 18:23:46 +01:00
parent 1526daaba2
commit 2799faaa73
2 changed files with 3 additions and 3 deletions
+2 -1
View File
@@ -7,7 +7,7 @@ pub fn main() {
let (tx, rx) = mpsc::channel(); let (tx, rx) = mpsc::channel();
let max_threads = 128; let max_threads = 32;
let mut handles = vec![]; let mut handles = vec![];
for chunk in (0..500).collect::<Vec<_>>().chunks(max_threads) { for chunk in (0..500).collect::<Vec<_>>().chunks(max_threads) {
@@ -46,4 +46,5 @@ pub fn main() {
for (items, bench) in results { for (items, bench) in results {
println!("Results for {items} items:\n{bench}"); println!("Results for {items} items:\n{bench}");
} }
} }
+1 -2
View File
@@ -33,12 +33,11 @@ impl<T: Engine> Engine<BenchmarkResult> for Benchmark<T> {
let start = Instant::now(); let start = Instant::now();
for _ in 0..100 { for _ in 0..40 {
let start = Instant::now(); let start = Instant::now();
self.render(&cx); self.render(&cx);
let end = Instant::now(); let end = Instant::now();
times.push(end.duration_since(start).as_micros()); times.push(end.duration_since(start).as_micros());
self.0.render_delay();
} }
let end = Instant::now(); let end = Instant::now();