Title bytes under flights' writes compared with AVX2 on threads of their own, the pairs sent up made on them; helpers that work ahead are not kept on the fast cores
VICTORY_UNDER_WIDE=0, VICTORY_UNDER_THREADS (6), VICTORY_FAST_CORES=3 (as before: all of them), VICTORY_WIDE_SPIN=<us> (0: off). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
fa4f6c33e6
commit
a69eb0cacb
6 files changed
+306
-82
No files matched your search
@@ -39,7 +39,10 @@ fn fast_of(sets: &[(u32, u8)]) -> Vec<u32> {
|
||||
}
|
||||
|
||||
/// `VICTORY_FAST_CORES`: 0: no thread asks; 1: the threads a frame waits for
|
||||
/// one by one; 2 (the default): the threads they share their work with too.
|
||||
/// one by one; 2 (the default): the threads they share their work with too;
|
||||
/// 3: those that work beside the rest as well (lists translated, descriptors
|
||||
/// made): more threads by then than the fast cores run at a time, while the
|
||||
/// slow ones stood idle.
|
||||
fn stage() -> u32 {
|
||||
static STAGE: std::sync::OnceLock<u32> = std::sync::OnceLock::new();
|
||||
*STAGE.get_or_init(|| std::env::var("VICTORY_FAST_CORES").ok().and_then(|v| v.trim().parse().ok()).unwrap_or(2))
|
||||
@@ -60,6 +63,12 @@ pub(crate) fn keep_helper_on_fast_cores(what: &str) {
|
||||
ask(what, 2);
|
||||
}
|
||||
|
||||
/// [`keep_on_fast_cores`] for one of many threads whose work is ahead of what
|
||||
/// a frame waits for.
|
||||
pub(crate) fn keep_many_on_fast_cores(what: &str) {
|
||||
ask(what, 3);
|
||||
}
|
||||
|
||||
fn ask(what: &str, from: u32) {
|
||||
use windows_sys::Win32::System::Threading::{GetCurrentThread, SetThreadSelectedCpuSets};
|
||||
if stage() < from {
|
||||
|
||||
Reference in new issue
Block a user