ImageMagick merges sliding-window optimization making statistics up to 33x faster
cneuralnetwork · x · 2026-11-04
cneuralnetwork's ImageMagick PR was merged: instead of visiting every pixel of the neighborhood for each output pixel and channel, StatisticImage() now slides the neighborhood along each row — column-wise running sums/sums-of-squares for Mean/StdDev, per-column extrema for Min/Max, and a skip-list for Median/Mode where the left-hand column is removed as the right one is inserted.
Per-pixel cost drops from O(width×height) to O(width), skip-list inserts drop to 2×height, with some statistics up to 33x faster. Row-parallel OpenMP, virtual-pixel striping, and write-mask handling are unchanged.
More from Fun
- Suno song mourns AI-automated economists in Russian alt-rock — shockingly good — aniketapanjwani · 2026-11-04
- JavaScript oddity: switch(42) with a case of (() => 42)() actually matches and runs — mitsuhiko · 2026-11-04
- GPT-6 Astra fumbles digit-arranging task, losing annotated comparison to Gemini 4 Argon — qinzytech · 2026-11-04
- Dirac called renormalization 'sensible math' — turns out rigor cost billions and 1,150 pages — alexbilz · 2026-11-04
- Startup pitches 'monitor your agents so devs don't commit AI crimes' — basedjensen · 2026-11-04
- qwenFS and qwenGPU: a filesystem and SIMT GPU compiled into Qwen3.5-2B's weights — CatAstro_Piyush · 2026-11-04