Topic

Algorithms

Algorithm and data structure discussions covering complexity analysis, competitive programming, and practical implementation insights from developer communities.

What this topic tracks

  • Engineering practices and ecosystem debates
  • Tools, architecture, and implementation lessons
  • Relevant discussions from developer communities

Algorithms · 306 stories

Recent stories

Each story's summary, with the places it was discussed.

Summaries are written by AI from the linked sources. Open the source for full context.

20 stories

Project Patchouli: Open-source electromagnetic drawing tablet hardware

patchouli.readthedocs.io · 1 Jan

Algorithms · Hardware · Open Source

Project Patchouli is an innovative open-source project focused on the hardware implementation and documentation of Electro-Magnetic Resonance (EMR) pen tablet technology.

This initiative includes a comprehensive coil array, an RF front end constructed from commercially available components, and advanced digital signal processing algorithms. A standout feature is its compatibility with most commercial pens from various vendors, providing an ultra-low-latency input experience for customized hardware projects. Beyond the hardware, Project Patchouli offers extensive documentation covering EMR mechanisms, circuit designs, and proprietary pen protocols, aiming to democratize access to high-performance stylus technology for the global developer community. Sponsored by the NLnet Foundation, the project emphasizes accessibility and transparency through open-source licenses such as CERN-OHL-S and GPLv3.

OpenAI's matrix multiplication paper solved a harder problem in computer science

newscientist.com · 4 Dec

Artificial Intelligence · Algorithms · OpenAI · Mathematics · Computer Science

An AI model used by OpenAI to solve matrix multiplication also produced the first known superlinear lower bound for a non-trivial Boolean-circuit problem, element distinctness—an achievement researchers say may be more significant than the assigned result.

The proof, largely hidden in a poorly written paper, links faster arithmetic matrix multiplication to circuit complexity and was verified partly with Lean. Although its method remains unclear, it could advance complexity theory, including P vs NP, while showing AI may overlook discoveries unrelated to its explicit task.

Replacing a 3 GB SQLite db with a 10 MB FST (finite state transducer) binary

til.andrew-quinn.me · 10 May

Algorithms · Performance · Rust

The author optimized a Finnish dictionary, Taskusanakirja, by replacing a large SQLite database with a Finite State Transducer (FST) implemented in Rust.

This transition achieved a 300x reduction in memory, compressing 40-60 million inflected word forms into just 10 MB, enabling highly efficient, portable prefix searching for agglutinative languages.

What algorithm did Windows XP use to choose your initial user picture?

devblogs.microsoft.com · 9 Sept

Algorithms · Low-Level Programming · Operating Systems

Windows XP selects the initial account profile picture using RtlRandomEx, seeded with GetTickCount().

It scans the Default Pictures directory once, applying k=1 reservoir sampling: each item gets a 1/count chance to replace the current winner. This reduces filesystem calls, tolerates directory changes, and stops after 100 pictures to prevent pathological cases.

bzip3

github.com · 7 Sept

Algorithms · Performance · Open Source

BZip3 is a faster, higher-ratio spiritual successor to BZip2, combining Burrows-Wheeler transform, context mixing, RLE, LZ77-style matching, and PPM-style modeling.

It targets text and code, supports parallel compression and multiple architectures, and outperforms BZip2 in the provided benchmarks. Installation uses Autotools or package managers; BZip3 is LGPLv3-licensed and carries data-loss disclaimers.

Show HN: Algorithmically Finding the Longest Line of Sight on Earth

alltheviews.world · 9 Feb

Algorithms · Big Data · Computer Science

This project highlights the discovery of the world's longest lines of sight using a custom-developed algorithm named CacheTVS.

By exhaustively analyzing topographical data across the planet, researchers identified the longest possible direct view: a 530km span from the Hindu Kush to Pik Dankova. Other notable mentions include a 504km line from Antioquia to Pico Cristobal in Colombia and a 483km view from Mount Elbrus in Russia across the Black Sea to the Pontic Mountains in Turkey. The project provides an interactive map containing approximately 4.5 billion calculated lines of sight, showcasing how geography, atmospheric conditions, and advanced computational algorithms can uncover unique geographical records.

reladraw/reladraw

github.com · 26 Sept

Algorithms · Programming Languages · TypeScript

reladraw is an early-stage text language for diagrams that lets authors specify placement through relationships rather than coordinates or automatic layout.

Its TypeScript parser and deterministic constraint resolver compute the tightest layout, and its CLI renders standalone SVGs. By keeping layout intent readable and editable in source, reladraw aims to make diagram creation and revision more predictable for people and AI agents.

RIP, vector database

turbopuffer.com · 30 Sept

Algorithms · Database · Performance

turbopuffer is redesigning its storage architecture in “turbopuffer v3,” demoting the ANN vector index from primary to secondary.

The change addresses storage and write amplification caused by ANN-addressed documents, plus block-size constraints that limit vectorized execution. Built on object storage, v3 aims to support broader query plans and higher scale, though performance tuning is just beginning.

Bubble Sorted Amen Break

parametricavocado.itch.io · 12 Mar

Algorithms · Programming Languages · Computer Science

A creative experimental project that applies the Bubble Sort algorithm to the iconic Amen Break drum pattern.

This Windows application visualizes and sonifies the process of sorting audio segments, transforming a classic breakbeat through algorithmic manipulation to create a unique intersection of computer science and music production.

It's all a blur

lcamtuf.substack.com · 6 Feb

Algorithms · Cybersecurity · Computer Science

This article explores how common image blurring algorithms, specifically moving averages, are often reversible.

By demonstrating a pixel-reconstruction method based on arithmetic means and padding, the author shows that even 2D filters and lossy JPEG compression often fail to securely redact information, allowing for significant recovery of original details.

Faster Retrieval for Better, More Efficient RAG

machinelearning.apple.com · 11 Nov

Artificial Intelligence · Algorithms · Deep Learning · Machine Learning · Computer Science

Apple researchers propose amortized Maximum Inner Product Search (MIPS): small neural networks trained offline on a fixed key database and real query distributions accelerate retrieval.

SupportNet learns cluster support functions for better routing, while KeyNet predicts the best-matching key and rewrites queries for existing IVF indexes. On Natural Questions with 2.6 million passages, SupportNet reached 95% routing recall 1.9× faster than centroid routing, while KeyNet achieved 99% recall up to 8× faster and with 11× fewer scanned keys.

A 3D fruit fly on macOS desktop powered by the real FlyWire connectome

github.com · 18 Aug

Algorithms · macOS · Swift

desktop-fly is an open-source macOS menubar app featuring a procedural 3D fruit fly controlled by a live 1 kHz LIF simulation built from the FlyWire v783 connectome.

A 668-neuron circuit drives escape, walking, grooming, sleep, and flight from cursor and desktop stimuli. It includes an interactive brain view, tests, rebuildable data, and clearly distinguishes real wiring from modeled physiology.

Show HN: Wikipedia as a doomscrollable social media feed

xikipedia.org · 2 Feb

Algorithms · Open Source · Computer Science

Xikipedia is an experimental social media feed project that demonstrates the power of algorithmic content curation.

By leveraging Simple Wikipedia as its primary content source, the application uses a basic non-machine learning algorithm that runs entirely locally in the user's browser. The project illustrates how quickly digital systems can identify user engagement patterns to suggest similar content without relying on centralized data collection or collaborative filtering from other users. Privacy is a central component, as no data is stored or shared; everything is cleared upon closing the tab. The source code is publicly available on GitHub, inviting discussions across various social platforms regarding privacy-first algorithmic transparency and modern web development techniques.

SIMD-accelerated computer vision on a $2 microcontroller

shraiwi.com · 25 Oct

Algorithms · Computer Vision · Hardware · Low-Level Programming · Performance

A SIMD-accelerated FAST feature detector for the $2 ESP32-S3 uses its 128-bit SIMD instructions to process QVGA frames in about 6 ms and achieve roughly 220% higher throughput, rising from 5.1 MP/s to 11.2 MP/s.

The implementation handles the chip’s lack of misaligned reads, signed-only eight-bit comparisons, and saturating arithmetic using register-slice extraction and XOR-based unsigned-to-signed conversion, enabling real-time 30 fps VGA computer vision.

Flip Fluid on Flip Dots

mitxela.com · 26 Sept

Algorithms · Hardware · Performance

mitxela built a large interactive flipdot display running a FLIP fluid simulation for EMF2026.

Reclaimed panels were modified with custom KiCad driver boards, H-bridge chips, capacitors, CH32V003 controllers, RS485 distribution, and high-current power systems. After extensive soldering and mechanical work, eight panels produced fast, seamless, tactile, and audible fluid motion controlled by a joystick.

NASA Color Trick Was Meant for Mars. Now It's Unveiling Rock Art on Earth

gizmodo.com · 10 Sept

Algorithms · Computer Vision · Science

NASA’s decorrelation stretch technique, developed to enhance satellite imagery, helps archaeologists reveal faint or hidden details in ancient rock art.

Inspired by Mars images, Jon Harman adapted the method into the Dstretch plug-in, using custom color spaces to uncover previously undocumented figures and clarify existing paintings at sites across Mexico, Egypt, Canada, and Norway.

Since Chromium 148, Math.tanh is now fingerprintable to link underlying OS

scrapfly.dev · 12 Jul

Artificial Intelligence · Algorithms · Cybersecurity

Browsers exhibit fingerprinting leaks via floating-point math differences across operating systems.

Functions like Math.tanh and CSS trig functions route to host-specific libm libraries (glibc, libsystem_m, UCRT), causing minor bit variances. To maintain stealth, systems must perform bit-perfect reproduction of these specific vendor math implementations, ensuring absolute consistency with the claimed OS identity.

The fastest double-to-string algorithm you’ve never heard of

vitaut.net · 10 Aug

Algorithms · Performance · Computer Science

The article explores 'yy', a high-performance binary-to-decimal conversion algorithm found in the yyjson library.

As a member of the Schubfach family, 'yy' efficiently identifies the shortest decimal representation for a float using fixed-point arithmetic and a single multiplication. The text demonstrates this process through an E4M3 visualization and discusses how it manages rounding biases.

Same algorithm, 16x faster: optimizing a vector search engine’s hot path

dubeykartikay.com · 26 Apr

Algorithms · Performance · Computer Science

By optimizing data layout in the sembed-engine, I achieved up to 16x faster vector search performance without altering the algorithm.

Using flat arrays, cache-friendly memory access, SIMD instructions, squared distance calculations, and precomputed candidate scores, the CPU avoided pointer chasing and redundant computations, significantly improving throughput without sacrificing search recall.

Where it came fromHacker NewsRedditLobstersCreate a Snapbyte.dev digest and choose Algorithms as one of your topics.Build your digest