Bitwise Similarity Routing: Pathfinding Optimality via HBS-XNOR

Read full text
Authors: Andrés Sebastián Pirolo
Cited by: 0

Abstract

Standard implementations of Dijkstra's algorithm, while theoretically optimal in terms of path cost, are physically inefficient on modern hardware due to the "Memory Wall." In large-scale graphs (N ≥ 10⁶), the random memory access patterns inherent to blind traversal cause frequent cache misses, stalling the CPU pipeline and idling the processor for hundreds of cycles per node. This paper introduces HBS-XNOR, a hardware-native routing kernel designed to overcome this bottleneck by exploiting the bitwise structure of node identifiers. We propose a shift from theoretical optimality to Architectural Optimality, defined as the minimization of Time-to-Solution. HBS-XNOR utilizes a "Digital Compass" heuristic based on the XNOR bitwise equivalence operation: h(u,t) = popcount(~(u ⊕ t)), which executes in a single CPU cycle. By integrating this metric via Fused Multiply-Add (FMA) instructions—calculating priority as f(n) = fma(h, β, g)—the algorithm guides the search frontier to remain spatially localized. This localization maximizes L1/L2 cache residency, drastically reducing DRAM latency. Benchmarks on a Snapdragon 8 Gen 2 (ARM Cortex-X3) demonstrate that HBS-XNOR achieves a 2.6× average speedup and a 62.0% reduction in memory accesses compared to a highly optimized Dijkstra baseline, with peak speedups of 5.56×. Crucially, the algorithm exhibits graceful degradation: in worst-case topologies with zero identifier locality, it converges to the performance of standard Dijkstra but never underperforms it, offering a strict upgrade path. This technique provides a "zero-cost" latency optimization for critical infrastructure, including 5G packet routing, real-time navigation, and distributed graph databases.

Fields of Study & Subjects

Graph Theory and Algorithms Parallel Computing and Optimization Techniques Complexity and Algorithms in Graphs

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
11 February 2026
Language
EN
Document type
Preprint