workgroup-decode

command
v0.7.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

workgroup-decode

Compares decode latency at UserInteractive QoS with an os_workgroup against decode latency at Background QoS. Competing workers run at the same QoS as the low-priority decode mode. On macOS build 26B131, the low-priority mode and competing workers use Utility because setting Background can hang.

Running

CGO_ENABLED=0 go run ./examples/os/workgroup-decode

Flags:

  • -steps: timed decode steps per mode (default 200)
  • -work: inner-loop FMA iterations per decode step (default 32768)
  • -bg-workers: competing low-priority workers (default runtime.NumCPU())

Measured Results

Measured on an Apple M4 Max (16 cores: 12 P-cores, 4 E-cores) with CGO_ENABLED=0 go run ./examples/os/workgroup-decode:

workgroup-decode: cpus=16 bg-workers=16 steps=200 work=32768 max-parallel-threads=16

MODE               QOS (ACTUAL)             WORKGROUP  P50    P95      P99       THROUGHPUT
P-core decode      UserInteractive (rel=0)  yes        53µs   78µs     139µs     2523.5 steps/s
E-core background  Background (rel=0)       no         118µs  1.916ms  68.336ms  369.7 steps/s

P-core speedup vs Background: 493.25x lower p99 latency, 6.83x higher throughput

Documentation

Rendered for darwin/amd64

Overview

Command workgroup-decode compares latency-critical decode steps at UserInteractive QoS with os_workgroup against lower-QoS execution under competing CPU load.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL