<?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: Rehan Muhammad</title>
    <description>The latest articles on DEV Community by Rehan Muhammad (@rehantheorylabpixel).</description>
    <link>https://dev.to/rehantheorylabpixel</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%2F3953038%2Fe49997cb-8f34-435d-b591-7dd2747aaee3.png</url>
      <title>DEV Community: Rehan Muhammad</title>
      <link>https://dev.to/rehantheorylabpixel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rehantheorylabpixel"/>
    <language>en</language>
    <item>
      <title>I built a 49-engine subset-sum solver - here is how I measured it</title>
      <dc:creator>Rehan Muhammad</dc:creator>
      <pubDate>Tue, 26 May 2026 18:04:02 +0000</pubDate>
      <link>https://dev.to/rehantheorylabpixel/i-built-a-subset-sum-solver-35000x-faster-than-previous-approaches-31ic</link>
      <guid>https://dev.to/rehantheorylabpixel/i-built-a-subset-sum-solver-35000x-faster-than-previous-approaches-31ic</guid>
      <description>&lt;p&gt;The subset sum problem is NP-complete. Given integers, find a subset that sums to a target. Simple to state, exponentially hard to solve.&lt;/p&gt;

&lt;p&gt;I built a solver that races &lt;strong&gt;49 engines&lt;/strong&gt; against every instance - published baselines and original methods - and reports which engine produced the answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Every applicable engine attacks the problem at once. The first to find the answer wins, and the winner is reported. That second part matters: you do not just get an answer, you learn which class of technique solved that class of instance.&lt;/p&gt;

&lt;p&gt;Published baselines included for comparison: Schroeppel-Shamir, meet-in-the-middle (Horowitz-Sahni), BCJ, HGJ, ColumnSAT, Bonnetain, bitset DP.&lt;/p&gt;

&lt;p&gt;Original engines: GDEP (Goal-Driven Element Partitioning), adaptive core-aware partitioning, and arbitrary-precision (BigUint) paths for values beyond u128.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the numbers actually are
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;n=60, 64-bit: 524 s on an Intel i3-2100&lt;/strong&gt; - measured, 1,649x faster than BCJ's published runtime of 864,000 s (10 days)&lt;/li&gt;
&lt;li&gt;n=60 on a Ryzen 9: &lt;strong&gt;24.3 s projected&lt;/strong&gt; - that would be roughly 35,500x, but it is a projection, not a measurement&lt;/li&gt;
&lt;li&gt;Memory floor: &lt;strong&gt;~12 GB at n=60&lt;/strong&gt;. Below that the machine thrashes and runs 3-4x slower.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note: 864,000 is BCJ's runtime in seconds, not a speedup. The ratio is that figure divided by my time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not claim
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Baselines are quoted from publication, not re-measured on the same machine. A true head-to-head is still outstanding.&lt;/li&gt;
&lt;li&gt;No world records. The 65 categories are categories I defined; they measure coverage of my own suite.&lt;/li&gt;
&lt;li&gt;GPU support is detection only - all computation runs on CPU cores.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Code: &lt;a href="https://github.com/rehantheorylab-pixel/zpp-subset-sum-solver" rel="noopener noreferrer"&gt;https://github.com/rehantheorylab-pixel/zpp-subset-sum-solver&lt;/a&gt;&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>rust</category>
      <category>python</category>
      <category>performance</category>
    </item>
  </channel>
</rss>
