<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Michael Yang</title>
    <description>The latest articles on DEV Community by Michael Yang (@michael_yang_a9925b515901).</description>
    <link>https://dev.to/michael_yang_a9925b515901</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4070046%2Fd40e58d3-ffbc-49ad-b5e1-32cd8827b381.png</url>
      <title>DEV Community: Michael Yang</title>
      <link>https://dev.to/michael_yang_a9925b515901</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/michael_yang_a9925b515901"/>
    <language>en</language>
    <item>
      <title>I spent months building an exact incremental-computation library in C. I finally put the reproducible benchmarks on GitHub.</title>
      <dc:creator>Michael Yang</dc:creator>
      <pubDate>Sat, 29 Aug 2026 18:29:54 +0000</pubDate>
      <link>https://dev.to/michael_yang_a9925b515901/i-spent-months-building-an-exact-incremental-computation-library-in-c-i-finally-put-the-56pf</link>
      <guid>https://dev.to/michael_yang_a9925b515901/i-spent-months-building-an-exact-incremental-computation-library-in-c-i-finally-put-the-56pf</guid>
      <description>&lt;p&gt;I’ve been working on a performance project called HKD Kernel.&lt;/p&gt;

&lt;p&gt;The premise is that a lot of large computations repeat work unnecessarily. If only a tiny portion of the input changed, you ideally want to recompute only the state affected by that change rather than rebuild everything.&lt;/p&gt;

&lt;p&gt;HKD Kernel is a native C implementation of that idea with exact-result checks.&lt;/p&gt;

&lt;p&gt;The most surprising result for me has been the size of the gap on highly sparse workloads. Across the benchmark configuration currently documented in the repository, the measured mean speedup is around 18,000x versus the full-recomputation path.&lt;/p&gt;

&lt;p&gt;Huge caveat: that is not an “all software becomes 18,000x faster” claim. The gain comes specifically from workloads where most previously computed state remains valid.&lt;/p&gt;

&lt;p&gt;I made the benchmark reproducible because I’d rather have people try to break the claim than just believe a graph.&lt;/p&gt;

&lt;p&gt;GitHub:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/yangofzeal/hkd-kernel" rel="noopener noreferrer"&gt;https://github.com/yangofzeal/hkd-kernel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m particularly looking for:&lt;/p&gt;

&lt;p&gt;adversarial benchmark ideas&lt;br&gt;
real workloads with sparse state changes&lt;br&gt;
feedback on the C API&lt;br&gt;
cases where you think incremental recomputation would be the wrong architecture&lt;/p&gt;

&lt;p&gt;There’s a free/community path and I’m also testing a $999/month production-node Business license, but right now I’m much more interested in whether developers can reproduce or invalidate the technical results.&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>c</category>
      <category>opensource</category>
      <category>performance</category>
    </item>
    <item>
      <title>I built a C library that avoids recomputing unchanged state — here are the reproducible benchmarks</title>
      <dc:creator>Michael Yang</dc:creator>
      <pubDate>Sat, 29 Aug 2026 18:24:00 +0000</pubDate>
      <link>https://dev.to/michael_yang_a9925b515901/i-built-a-c-library-that-avoids-recomputing-unchanged-state-here-are-the-reproducible-benchmarks-f5n</link>
      <guid>https://dev.to/michael_yang_a9925b515901/i-built-a-c-library-that-avoids-recomputing-unchanged-state-here-are-the-reproducible-benchmarks-f5n</guid>
      <description>&lt;p&gt;Most performance optimization focuses on making each operation faster.&lt;/p&gt;

&lt;p&gt;HKD Kernel approaches a different question:&lt;/p&gt;

&lt;p&gt;What if most of those operations did not need to execute at all?&lt;/p&gt;

&lt;p&gt;I’ve been working on HKD Kernel, a native C library for exact sparse and incremental computation.&lt;/p&gt;

&lt;p&gt;The target workload looks like this:&lt;/p&gt;

&lt;p&gt;A large computation has already been evaluated.&lt;br&gt;
Only a small subset of the inputs changes.&lt;br&gt;
The dependency structure tells us which results can actually change.&lt;br&gt;
HKD recomputes those affected regions instead of repeating the entire calculation.&lt;/p&gt;

&lt;p&gt;The important word is exact. The optimized result must equal the result of full recomputation.&lt;/p&gt;

&lt;p&gt;What the benchmark measures&lt;/p&gt;

&lt;p&gt;The repository contains reproducible benchmarks comparing full recomputation with the HKD incremental path.&lt;/p&gt;

&lt;p&gt;Across the benchmark suite currently documented in the repository, the measured mean speedup is roughly 18,000x.&lt;/p&gt;

&lt;p&gt;That requires an important qualification:&lt;/p&gt;

&lt;p&gt;This does not mean HKD makes arbitrary programs 18,000x faster.&lt;/p&gt;

&lt;p&gt;It means that on workloads with sparse changes and reusable state, avoiding redundant computation can produce extremely large reductions in work.&lt;/p&gt;

&lt;p&gt;That distinction is important enough that I built the repository around reproducibility rather than a black-box benchmark claim.&lt;/p&gt;

&lt;p&gt;What HKD Kernel is not&lt;/p&gt;

&lt;p&gt;HKD Kernel:&lt;/p&gt;

&lt;p&gt;does not replace the macOS XNU kernel&lt;br&gt;
does not modify CPU microcode&lt;br&gt;
does not disable SIP&lt;br&gt;
does not change processor ALU hardware&lt;/p&gt;

&lt;p&gt;It is a user-space native computation library.&lt;/p&gt;

&lt;p&gt;Where I think this model is useful&lt;/p&gt;

&lt;p&gt;The workloads I’m most interested in include:&lt;/p&gt;

&lt;p&gt;dependency graphs&lt;br&gt;
incremental build systems&lt;br&gt;
large simulations with sparse updates&lt;br&gt;
optimization systems&lt;br&gt;
financial/risk recomputation&lt;br&gt;
logistics and scheduling&lt;br&gt;
cached numerical pipelines&lt;/p&gt;

&lt;p&gt;The real question is not “how fast is HKD?”&lt;/p&gt;

&lt;p&gt;It is:&lt;/p&gt;

&lt;p&gt;How much of your current computation is being repeated even though the inputs affecting it never changed?&lt;/p&gt;

&lt;p&gt;I’d especially like developers to try to break the benchmark assumptions or suggest workloads where sparse incremental evaluation should fail.&lt;/p&gt;

&lt;p&gt;Source, benchmarks and build instructions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/yangofzeal/hkd-kernel" rel="noopener noreferrer"&gt;https://github.com/yangofzeal/hkd-kernel&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is a community edition, and a commercial Business option for production-node licensing.&lt;/p&gt;

&lt;p&gt;Feedback on the C API and benchmark methodology is especially welcome.&lt;/p&gt;

</description>
      <category>c</category>
      <category>performance</category>
      <category>programming</category>
      <category>software</category>
    </item>
    <item>
      <title>40% Adam Optimizer Improvement: PyTorch Benchmarks</title>
      <dc:creator>Michael Yang</dc:creator>
      <pubDate>Sun, 09 Aug 2026 16:06:29 +0000</pubDate>
      <link>https://dev.to/michael_yang_a9925b515901/40-adam-optimizer-improvement-pytorch-benchmarks-4mhd</link>
      <guid>https://dev.to/michael_yang_a9925b515901/40-adam-optimizer-improvement-pytorch-benchmarks-4mhd</guid>
      <description>&lt;h1&gt;
  
  
  40% Adam Optimizer Improvement
&lt;/h1&gt;

&lt;p&gt;If you are training deep learning models in PyTorch, default optimizer implementations leave performance on the table.&lt;/p&gt;

&lt;p&gt;Check out this project demonstrating up to a &lt;strong&gt;40% Adam optimizer improvement&lt;/strong&gt;:&lt;br&gt;
&lt;a href="https://github.com/yangofzeal/adam/" rel="noopener noreferrer"&gt;https://github.com/yangofzeal/adam/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Highlights
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;40% faster step execution time in PyTorch.&lt;/li&gt;
&lt;li&gt;Drop-in replacement for standard Adam.&lt;/li&gt;
&lt;li&gt;Open-source implementation available on GitHub: &lt;a href="https://github.com/yangofzeal/adam/" rel="noopener noreferrer"&gt;https://github.com/yangofzeal/adam/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>pytorch</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
