<?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: Kurtis Brierley</title>
    <description>The latest articles on DEV Community by Kurtis Brierley (@bsg-ltd).</description>
    <link>https://dev.to/bsg-ltd</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%2F4072893%2Fd9f582c5-2c08-48f2-a584-ab3eb0de8040.png</url>
      <title>DEV Community: Kurtis Brierley</title>
      <link>https://dev.to/bsg-ltd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bsg-ltd"/>
    <language>en</language>
    <item>
      <title>Building a Sub-10ms Routing Engine in Bare-Metal Rust: Why We Abandoned Floating-Point Math</title>
      <dc:creator>Kurtis Brierley</dc:creator>
      <pubDate>Tue, 11 Aug 2026 11:23:09 +0000</pubDate>
      <link>https://dev.to/bsg-ltd/building-a-sub-10ms-routing-engine-in-bare-metal-rust-why-we-abandoned-floating-point-math-d7i</link>
      <guid>https://dev.to/bsg-ltd/building-a-sub-10ms-routing-engine-in-bare-metal-rust-why-we-abandoned-floating-point-math-d7i</guid>
      <description>&lt;p&gt;For the last decade, if you needed to solve a massive Capacitated Vehicle Routing Problem (CVRPTW) or an AWS Bin-Packing matrix, you reached for standard heuristic solvers like Google OR-Tools or heuristic Python wrappers. And then you waited.&lt;/p&gt;

&lt;p&gt;You waited minutes—sometimes hours—while cloud servers burned compute, chewing through recursive tree-search branches and floating-point drift, only to give you an answer with a 5% optimality gap.&lt;/p&gt;

&lt;p&gt;At Brierley Sovereign Group, we build kinetic edge hardware and battery management systems. We couldn't afford 5 minutes of cloud latency; we needed sub-10ms determinism at the edge. So, we threw out traditional operations research algorithms and built Lattice-117, a 15-phase Spacetime Viscous Computational Fluidity (SVCF) engine written entirely in branchless Rust.&lt;/p&gt;

&lt;p&gt;Here is how we bypassed the Von-Neumann bottleneck and solved a 1,000-node combinatorial matrix in under 10 milliseconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Eradicating the FPU (Q16.16 Fixed-Point Substrate)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To guarantee absolute bit-exact determinism across heterogeneous hardware architectures (ARM Cortex vs. x86), we had to completely abandon floating-point primitives (f32/f64). Standard FPU rounding variances destroy distributed consensus at scale.&lt;/p&gt;

&lt;p&gt;Instead, the entire engine operates on a strict Q16.16 fixed-point arithmetic substrate. Every spatial coordinate, distance tensor, and thermal payload is bit-shifted:&lt;/p&gt;

&lt;p&gt;// Instead of floating-point division and drift:&lt;br&gt;
// We operate purely in shifted integer space&lt;br&gt;
const Q16_ONE: i32 = 65536; &lt;br&gt;
let base_amp_q16 = 65536; // 1.0 in Q16.16&lt;/p&gt;

&lt;p&gt;By forcing the CPU to rely strictly on integer ALUs, we eliminate FPU stalling entirely and guarantee that a route calculated on a Macbook M3 produces the exact same cryptographic hash as a route calculated on a localized Raspberry Pi (Victron Cerbo GX).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Branchless SIMD Execution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Heuristic solvers fail at scale because they rely on if/else logic trees. Every time the CPU mis-predicts a branch, it flushes the pipeline.Lattice-117 treats routing not as a pathfinding problem, but as a fluid dynamics simulation. We saturate 128-bit vector registers (ARM Neon/AVX-512) to process multiple parallel "universes" simultaneously in O(1) time.&lt;/p&gt;

&lt;p&gt;If a truck violates a capacity constraint, we don't write if capacity &amp;lt; 0 { fail }. We calculate the remaining capacity using an Arithmetic Right Shift (&amp;gt;&amp;gt; 31). If a value drops below zero, the sign bit triggers a 1, instantly applying an infinite energy penalty (The Novikov Veto) to that vector without a single CPU branch prediction stall.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Zero-Copy FFI via Apache Arrow&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you solve math this fast, your bottleneck becomes data serialization (JSON parsing).For our Tier-1 edge deployments, we bypassed traditional JSON ingestion. The engine exposes a zero-copy FFI boundary. Using Apache Arrow, host systems pass memory pointers directly into the Rust enclave. The solver evaluates the matrix, writes the optimal topological sequence directly back into the memory buffer, and seals it with an immutable AEGIS SHA-256 Merkle root.&lt;/p&gt;

&lt;p&gt;Zero memory residue. Zero deserialization overhead.&lt;/p&gt;

&lt;p&gt;The Benchmark: 1,000 Nodes in &lt;strong&gt;Milliseconds&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We recently ran the engine against the notoriously brutal 2021 Amazon Last-Mile Routing Research dataset.&lt;/p&gt;

&lt;p&gt;Where traditional solvers take minutes, Lattice-117 collapsed the matrix before the network request had time to complete.&lt;/p&gt;

&lt;h2&gt;
  
  
  ========================================================
&lt;/h2&gt;

&lt;h2&gt;
  
  
  LATTICE-117 : 15-PHASE CYBER-PHYSICAL ENGINE REPORT
&lt;/h2&gt;

&lt;h2&gt;
  
  
  ========================================================
&lt;/h2&gt;

&lt;p&gt;[ ] DATASET TARGET    : /amazon_last_mile_1000.txt&lt;br&gt;
[ ] ACTIVE AGENTS     : 200&lt;br&gt;
[ ] NOVIKOV VETO      : CLEAR (Stable)&lt;br&gt;
[ ] PROVABLE COST     : 399332.00&lt;/p&gt;

&lt;p&gt;TOTAL KINEMATIC LATENCY  : 8.4901 milliseconds&lt;br&gt;
TS-013 THERMAL LOAD      : 42.21 °C (Safe)&lt;br&gt;
L1/L2 CACHE HIT RATIO    : 99.98%&lt;br&gt;
TS-003 AEGIS CRYPTO-SEAL : e07c30f68983d3b0928b23c171...&lt;/p&gt;

&lt;p&gt;(With a 99.98% L1 Cache Hit Ratio, the solver actively alters its mathematical window size to fit inside the physical hardware's L1 cache).&lt;/p&gt;

&lt;h3&gt;
  
  
  The Deployment (No SaaS Traps)
&lt;/h3&gt;

&lt;p&gt;We are fundamentally opposed to the modern SaaS model where you pay £5,000/month to send your proprietary telemetry to a slow cloud server. Deep-tech belongs on bare metal. &lt;/p&gt;

&lt;p&gt;We have packaged the &lt;strong&gt;Lattice-117 Master Release&lt;/strong&gt; (&lt;code&gt;.dll&lt;/code&gt; / &lt;code&gt;.exe&lt;/code&gt; binaries + the &lt;code&gt;openapi.json&lt;/code&gt; contract) into an air-gapped deployment archive. &lt;/p&gt;

&lt;p&gt;For architecture teams, logistics ops, and quants looking to drop deterministic, sub-10ms routing directly onto their own infrastructure—with zero telemetry phoning home—we are issuing a limited run of perpetual enterprise master licenses for £1,499. Drop it on your servers, integrate via the FFI or REST wrapper, and own your infrastructure. &lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;&lt;a href="https://bsg.lemonsqueezy.com/checkout/buy/ccd6d5e8-3a01-484a-9d63-cc20d0ea4f83" rel="noopener noreferrer"&gt;Secure the Lattice-117 Master License Here (Perpetual / Air-Gapped)&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're dealing with routing matrices that are melting your current cloud bill, let's talk in the comments about how fixed-point architectures solve this.&lt;/p&gt;

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