Urgent.News

What's breaking now, across thousands of outlets.

Tech

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

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…

A C library called HKD Kernel has been developed to minimize repeated computations by focusing on exact sparse and incremental computation. Instead of recomputing an entire large calculation, HKD only reevaluates the small subset of inputs that have changed. The library ensures the optimized result matches the result of a full recompute.

The benchmarks in the repository indicate a mean speedup of approximately 18,000x when comparing full recomputation with the HKD incremental path. However, this speedup is workload-specific—it does not mean HKD makes any arbitrary program 18,000x faster. HKD Kernel is not a replacement for the macOS XNU kernel, nor does it alter CPU microcode or disable System Integrity Protection (SIP).

Instead, it is a user-space native computation library that can be beneficial in workloads such as dependency graphs, incremental build systems, large simulations with sparse updates, optimization systems, financial/risk recomputation, logistics and scheduling, and cached numerical pipelines. The true question to ask is not how fast HKD is, but rather how much of your current computation is repeated even when the inputs are unchanged.

Developers are encouraged to challenge the benchmark assumptions or propose workloads where sparse incremental evaluation might fail. The source code, benchmarks, and build instructions are available at https://github.com/yangofzeal/hkd-kernel, along with a community edition and a commercial Business option for production-node licensing.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The Robots Had Their Biggest Week Yet — Record-Breaking Games, a Viral $399 Duck, and Billion-Dollar Bets

Robotics stopped feeling like a side story this week and started feeling like the main event, with humanoid machines breaking human athletic records, a tiny desktop robot going viral, and investors…

  • Robots set world records at China's Humanoid Robot Games, outperforming human reflexes
  • Microduck desktop robot sells over $1M worth, coinciding with Nvidia-Hugging Face acquisition talks

More from Saturday 29 August →