perf(cores): run the submitting thread's helpers at its priority
The submitting thread runs above normal, but the threads it waits for (the wide pool, the landing pools, heap records, the heap pass beside the lists) ran at normal priority, level with the title's threads and the list translators. On a six-core CPU they were often not running while it waited. VICTORY_HELPER_PRIORITY (on unless 0, VICTORY_AB can flip it) raises them to above normal. A/B in one run on an i5-12400F with an RTX 3060 (run10, Series S at 540p, off / on): 8.6 / 9.6 fps, refreshes 23.1 / 17.6 ms a frame, waiting for heap records 6.2 / 2.5 ms, card idle behind the submitting thread 24.7 / 13.2 ms. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
5 files changed
+62
-1
No files matched your search
@@ -1562,8 +1562,10 @@ fn workers() -> &'static Workers {
|
||||
for i in 0..wide_threads() {
|
||||
let _ = std::thread::Builder::new().name(format!("victory-wide-{i}")).spawn(move || {
|
||||
crate::cores::keep_helper_on_fast_cores("victory-wide");
|
||||
let mut priority = crate::cores::Priority::new();
|
||||
let workers = WORKERS.get().expect("made above");
|
||||
loop {
|
||||
priority.keep();
|
||||
let job = {
|
||||
// A little while awake first: the next work comes
|
||||
// within microseconds more often than not.
|
||||
|
||||
Reference in new issue
Block a user