Skip to main content

Maximize the absolute computing power of your Python process with a single line of code.

Project description

보스, 멀티 프로세스 가속 기능인 V2 ULTIMATE 모드가 새롭게 추가되었으니, 전 세계 개발자들이 보고 눈이 뒤집어질 만한 영문 README.md도 그에 맞게 완전히 업그레이드했습니다!

기존 내용에 V2의 핵심인 멀티프로세싱 자원 점령 기능(ULTIMATE mode)을 눈에 띄게 추가한 최종본입니다. 그대로 복사해서 덮어쓰시면 됩니다.

Markdown

⚡ fasthardware

PyPI version Downloads License: MIT

Maximize the absolute computing power of your Python process and all its child processes with just a single line of code.

fasthardware is a lightweight, zero-configuration hardware acceleration injector designed for high-performance, real-time Python applications (e.g., YOLO object detection, MediaPipe pose estimation, OpenCV video pipelines, and heavy distributed inference loops).

By hijacking the OS scheduler, managing runtime memory thresholds, and forcing strict CPU core binding across multi-processes, fasthardware eliminates micro-stuttering and stabilizes frames under heavy loads.


🚀 Key Features

  • OS Priority Escalation: Automatically forces the host OS (Windows/Linux) to allocate maximum CPU scheduling priority to your Python process.
  • 🔥 ULTIMATE Multi-Process Interception: Automatically tracks all spawned child processes, forces them into high-priority classes, and binds them to dedicated CPU cores (CPU Affinity) to eliminate distributed bottlenecks.
  • Micro-Stuttering Elimination: Optimizes Python's Garbage Collection (GC) thresholds to prevent "Stop-the-World" latency spikes during heavy loops.
  • C-Level Multicore Mobilization: Injects global environment flags (OMP, MKL, OPENBLAS, NUMEXPR) to force underlying C/C++ backed libraries (NumPy, OpenCV) to utilize every single logical core available.
  • Zero-Config Integration: No code rewrites. Just import it at the very top of your script.

📦 Installation

Install the package directly from PyPI:

pip install fasthardware

🛠️ Quick Start

  1. Default Mode (Single Process Boost) Perfect for standard loops like standalone YOLO inference or single-camera stream pipelines.
from fasthardware import fasthardware

Unlock maximum priority for the current process

fasthardware.speedup()

Your heavy real-time loop goes here...

  1. ULTIMATE Mode (Multi-Process & Distributed Boost) Designed for massive pipelines that spawn child processes (e.g., multi-GPU frameworks, distributed learning, parallel workers). It intercepts all child processes and binds them to specific cores.
from fasthardware import fasthardware

Supercharge both main and all child processes recursively

fasthardware.speedup(mode="ULTIMATE")

Your heavy multiprocessing/distributed pipeline here...

🧹 Manual Memory Sweeping (Optional) For ultra-heavy asynchronous pipelines (e.g., blending AI inference with async API requests or audio generation), manually sweep the 0-generation memory cache without breaking your frame rate:

# Call this at the end of your loop iteration if necessary
fasthardware.manual_sweep()

📊 Performance Impact Actual benchmarking on heavy real-time pipelines (YOLOv8 Inference + Parallel Workers):

Standard Python Implementation: ~30 FPS (with frequent micro-stutters and core thrashing)

With fasthardware (ULTIMATE Mode): 53+ FPS (Stable, zero core competition, 40%+ performance jump)

📜 License This project is licensed under the MIT License - see the LICENSE file for details.

Developed with ⚡ by Choi Woongyo.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fasthardware-2.0.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fasthardware-2.0.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file fasthardware-2.0.1.tar.gz.

File metadata

  • Download URL: fasthardware-2.0.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for fasthardware-2.0.1.tar.gz
Algorithm Hash digest
SHA256 792dbec1b6f49facdf150252e0ed9ef56a3f1ad427032aedb1d5fb76cb06db04
MD5 886036da156faf9f9e283f551e502994
BLAKE2b-256 933aee8f905863b474ec1f45339fc2c4d7321eb6ef77e40336a77da8087a305c

See more details on using hashes here.

File details

Details for the file fasthardware-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: fasthardware-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for fasthardware-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ce56b1e3b27d11a08090dab0e6c734e4db4d23623e8c0a14e59ff0a45086b8d
MD5 ff4cb6bea37a2c344fcfced44e3f1100
BLAKE2b-256 90a76243786e84f950f38be46e3c77a4934f308ed1b992d7bfbb44e04e30d2aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page