rtiow: default thread count to half the cores.
This seems to be faster than using both HT buddies.
This commit is contained in:
parent
739b38b4ed
commit
d213e04c11
@ -501,7 +501,8 @@ fn render_worker(
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn render(scene: Scene, output_dir: &Path) -> std::result::Result<(), std::io::Error> {
|
pub fn render(scene: Scene, output_dir: &Path) -> std::result::Result<(), std::io::Error> {
|
||||||
let num_threads = scene.num_threads.unwrap_or_else(num_cpus::get);
|
// Default to half the cores to disable hyperthreading.
|
||||||
|
let num_threads = scene.num_threads.unwrap_or_else(|| num_cpus::get() / 2);
|
||||||
let (pixel_req_tx, pixel_req_rx) = sync_channel(2 * num_threads);
|
let (pixel_req_tx, pixel_req_rx) = sync_channel(2 * num_threads);
|
||||||
let (pixel_resp_tx, pixel_resp_rx) = sync_channel(2 * num_threads);
|
let (pixel_resp_tx, pixel_resp_rx) = sync_channel(2 * num_threads);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user