COMPLETED Tools

PaimonCore Boost

A Genshin Impact-inspired Windows CPU optimiser that keeps Intel P-cores active via adaptive multi-threaded load, delivering +6.11% average C++ compilation performance improvement (peak +11.69%) on hybrid-core processors.

status COMPLETED
type Tools
stack ['Python' 'psutil' 'threading' 'NumPy' 'matplotlib' 'MSVC' 'Clang' 'Windows 11']

// DESCRIPTION

Project Overview / 项目概述

PaimonCore Boost is a Windows CPU performance optimisation tool that scientifically replicates and extends a curious “urban legend”: running Genshin Impact in the background measurably improves the performance of other applications. By reverse-engineering the mechanism (background activity keeping P-cores active on Intel's hybrid architecture), PaimonCore Boost transforms this accidental effect into a controlled, measurable, configurable optimisation utility. Benchmark results show a +6.11% average improvement in C++ compilation performance (peak +11.69%) in high-background-load environments.

PaimonCore Boost 是一款 Windows CPU 性能优化工具,科学地复现并扩展了一个有趣的 “都市传说”:在后台运行《原神》(Genshin Impact) 可以明显提升其他应用的性能。 通过逆向工程揭示其机制(后台活动使 Intel 混合架构上的 P 核保持活跃),PaimonCore Boost 将这种意外效应转化为可控、可测量、可配置的优化工具。基准测试结果显示,在高后台负载环境下, C++ 编译性能平均提升 +6.11%(峰值 +11.69%)。

Situation & Motivation / 背景与动机

Starting with Intel's 12th-generation processors, consumer CPUs feature a hybrid P-core (Performance) / E-core (Efficiency) architecture managed by Windows' Thread Director. The scheduler dynamically assigns tasks to P-cores or E-cores based on demand signals. A widely-reported community observation was that Genshin Impact's background activity — its audio engine, network heartbeats, and asset streaming — happened to generate exactly the kind of demand signal that kept P-cores warm and readily available for other processes. Compile-heavy workloads and games with poor scheduler awareness benefited measurably from this side effect.

从 Intel 第 12 代处理器开始,消费级 CPU 采用了由 Windows Thread Director 管理的 P 核(性能核) / E 核(能效核)混合架构。调度器根据需求信号动态地将任务分配给 P 核或 E 核。社区广泛报告的现象是, 《原神》的后台活动 — 其音频引擎、网络心跳和资产流 — 恰好产生了能使 P 核保持活跃、 随时供其他进程使用的需求信号。编译密集型工作负载和调度器感知较差的游戏从这一副作用中受益明显。

Task & Design Goals / 目标与设计

Reverse-engineer the Windows Thread Director signal mechanism, design a minimal Python daemon that reproduces the P-core activation effect without running a full game engine, and validate the benefit rigorously with a reproducible C++ compilation benchmark suite. The tool should include real-time CPU monitoring (utilisation, frequency, temperature), intelligent load adjustment to prevent overheating, and a detailed performance analysis report. Support both MSVC and Clang compilers for benchmark coverage.

逆向工程 Windows Thread Director 信号机制,设计一个最小化 Python 守护进程来复现 P 核激活效果, 无需运行完整游戏引擎,并通过可复现的 C++ 编译基准测试套件严格验证其收益。工具应包括实时 CPU 监控 (利用率、频率、温度),防止过热的智能负载调节,以及详细的性能分析报告。基准测试覆盖 MSVC 和 Clang。

Action & Implementation / 实施细节

The core activation algorithm runs a configurable pool of threads performing parallel matrix computations, tuned to generate precisely the CPU demand signature that Windows Thread Director interprets as P-core-worthy work:

def paimon_core_activation():
    while keep_cores_active:
        parallel_matrix_computation()   # multi-thread BLAS-style ops
        adaptive_load_control()         # back off if temperature threshold crossed

Four optimisation mechanisms are implemented:

  • Resource contention relief: in high-background-load conditions, ensures critical applications receive P-core allocation instead of being relegated to E-cores.
  • Intelligent task separation: E-cores handle OS and background tasks; P-cores are kept available for the user's primary workload.
  • Scheduler steering: the demand signal influences Windows Task Scheduler's core assignment decisions for the target process.
  • Cache efficiency: P-cores carry larger L2/L3 caches; keeping them active improves cache-hit rates for compilation and ML workloads.

The benchmark suite tests four C++ workload categories under paired baseline/boosted conditions: template compilation (MSVC + Clang), mathematical computation (Clang + MSVC), STL-intensive code, and simple compilation — covering representative developer workloads. An environment auto-detection script (test_env_config.py) automatically discovers installed compilers (MSVC, Clang) so the benchmark is fully reproducible across different developer machines.

Results & Impact / 成果与影响

In high-background-load environments — the primary target scenario for developers running browser tabs, Slack, and other background processes while compiling — PaimonCore Boost delivers a +6.11% average improvement with a +11.69% peak in C++ compilation time. Specific measurements:

  • MSVC template compilation: 1.901 s → 1.841 s (+3.17%)
  • Clang template compilation: 1.032 s → 1.016 s (+1.52%)
  • Clang mathematical computation: 1.209 s → 1.183 s (+2.22%)
  • MSVC simple compilation: 1.891 s → 1.870 s (+1.10%)

The project demonstrates how a community observation about an unexpected gaming side effect can be turned into a rigorous engineering investigation. It provides a reusable tool for C++/Rust developers and content creators on Intel 12th-gen+ hardware, with an open roadmap for VS Code extension integration, multi-compiler support (GCC, Rust, Go), and a GUI interface.

在高后台负载环境中(开发者边运行浏览器标签、Slack 和其他后台进程边编译的主要目标场景), PaimonCore Boost 带来了 +6.11% 的平均提升,峰值 +11.69%。 该项目展示了如何将一个关于游戏意外副作用的社区观察,转化为严谨的工程调查。 它为 Intel 12 代以上硬件上的 C++/Rust 开发者和内容创作者提供了一个可重用的工具, 并有开放路线图,规划了 VS Code 扩展集成、多编译器支持(GCC、Rust、Go)和 GUI 界面。

// HIGHLIGHTS

['+6.11% average C++ compilation performance improvement (peak +11.69%) in high-background-load environments on Intel hybrid-core CPUs', 'Reverse-engineered Windows Thread Director's P-core activation signal — turned a Genshin Impact “urban legend” into a reproducible engineering tool', 'Lightweight Python daemon using adaptive multi-threaded matrix computation to keep P-cores warm without requiring a game engine', 'Four-mechanism optimisation: resource contention relief, task separation, scheduler steering, and cache efficiency via P-core residency', 'Reproducible C++ benchmark suite covering template compilation, math-heavy code, STL-intensive workloads under MSVC and Clang', 'Auto-detecting environment config script discovers installed compilers (MSVC, Clang v19+) for fully portable benchmarking', 'Real-time CPU monitoring: utilisation, per-core frequency, temperature with adaptive thermal throttling to prevent overheating', 'Open roadmap: VS Code extension integration, GCC/Rust/Go compiler support, GUI interface, and CI/CD pipeline plugin']