Benchmarks
Processing time varies with the CPU, thread count, image characteristics, resolution, and codec implementation. We do not claim that zenpix is generally faster than Sharp or always produces higher quality.
Status of the numbers
Section titled “Status of the numbers”The following summary comes from measurements made on 2026-05-25 with zenpix 1.0.0. Some input images cannot be redistributed, so these numbers are historical observations rather than evidence that a third party can reproduce immediately after cloning the repository.
- PNG decode → resize → AVIF encode
quality=60,speed=6- two warm-ups, ten measured runs, wall-clock median
- ratio = Sharp median ÷ zenpix median
- ratio > 1 means zenpix was faster in that measurement; ratio < 1 means Sharp was faster
Results change with the workload
Section titled “Results change with the workload”| Environment and image | Observed tendency |
|---|---|
| Ubuntu VPS, 2 vCPU, selected character and impasto illustrations | zenpix produced ratios from 1.29 to 1.63 |
| The same VPS, tiled images and high-resolution bright images | Sharp was faster |
| Apple M4 Pro, zenpix single-threaded | Sharp was faster in every measured cell |
Apple M4 Pro, zenpix threads=14 | zenpix led on selected FHD images; Sharp led on most WQHD / 4K cases |
Because the fixtures are not redistributable, these observations are not generalized into a claim that zenpix is faster than Sharp. The benchmark code is available under bench/ for measurements with images you are allowed to use.
Quality settings
Section titled “Quality settings”The zenpix AVIF implementation requests YUV 4:4:4 from libavif and sets its alpha-quality option to lossless; actual output also depends on codec implementation and version. The same numeric quality value does not mean equal visual quality across different encoders, and output sizes differ. The current comparison script does not calculate SSIM or PSNR, so sample images are visual references only.
Try AVIF encoding in the browser
Section titled “Try AVIF encoding in the browser”This demo uses zenpix-wasm to encode raw RGB / RGBA pixels to AVIF in the browser. It does not contain native zenpix decoding, resizing, or the CLI.
Drop or click to select
JPEG / PNG / WebP · max 2MP
In-browser only. No data is sent to a server.
Run locally
Section titled “Run locally”Place fixtures that you have permission to use under test/fixtures/, then run:
npm run buildnpm run benchBENCH_FIXTURES=bench_input npm run benchAVIF_THREADS=4 npm run bench:threadsbun bench/quality-compare.tsPublished results should include the OS, CPU, memory, dependency versions, thread count, and whether the fixtures can be redistributed.