今日已更新 84 条资讯 | 累计 37333 条内容
关于我们

I built a C library that avoids recomputing unchanged state — here are the reproducible benchmarks

Michael Yang 2026年08月30日 02:24 0 次阅读 来源:Dev.to

Most performance optimization focuses on making each operation faster. HKD Kernel approaches a different question: What if most of those operations did not need to execute at all? I’ve been working on HKD Kernel, a native C library for exact sparse and incremental computation. The target workload looks like this: A large computation has already been evaluated. Only a small subset of the inputs changes. The dependency structure tells us which results can actually change. HKD recomputes those affected regions instead of repeating the entire calculation. The important word is exact. The optimized result must equal the result of full recomputation. What the benchmark measures The repository contains reproducible benchmarks comparing full recomputation with the HKD incremental path. Across the benchmark suite currently documented in the repository, the measured mean speedup is roughly 18,000x. That requires an important qualification: This does not mean HKD makes arbitrary programs 18,000x faster. It means that on workloads with sparse changes and reusable state, avoiding redundant computation can produce extremely large reductions in work. That distinction is important enough that I built the repository around reproducibility rather than a black-box benchmark claim. What HKD Kernel is not HKD Kernel: does not replace the macOS XNU kernel does not modify CPU microcode does not disable SIP does not change processor ALU hardware It is a user-space native computation library. Where I think this model is useful The workloads I’m most interested in include: dependency graphs incremental build systems large simulations with sparse updates optimization systems financial/risk recomputation logistics and scheduling cached numerical pipelines The real question is not “how fast is HKD?” It is: How much of your current computation is being repeated even though the inputs affecting it never changed? I’d especially like developers to try to break the benchmark assumptions or suggest w

本文内容来源于互联网,版权归原作者所有
查看原文