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

Intuiting Pratt Parsing

louis.co.nz · 26 Mar

Algorithms · Programming Languages · Computer Science

Pratt parsing is an efficient, intuitive algorithm for constructing abstract syntax trees.

It builds trees by analyzing operator precedence: right-leaning for increasing precedence and left-leaning for decreasing precedence. By utilizing recursive function calls and a loop to backtrack along the expression spine, Pratt parsing effectively manages operator associativity and precedence in a simple, compact implementation.

The efficient frontier of LLM inference

baseten.co · 2 Sept

Algorithms · Hardware · Performance

Inference engineering uses efficient frontiers to balance latency, throughput, cost, quality, and reasoning.

Batch sizing, parallelism, and quantization target points on these frontiers, while kernel/runtime optimization, speculative decoding, and prefill/decode disaggregation push the frontier outward. Empirical tuning is essential because performance changes are jagged, and improvements can compound across hardware and software.

Compiler-style optimization for drawing via Skia

arxiv.org · 17 Sept

Algorithms · Performance · Programming Languages

Researchers introduce μ Skia, a formal, Lean-mechanized semantics for Skia’s 2D rasterization, covering canvas state, layers, blending, and color filters.

They use it to verify four Chrome optimization patterns and build a high-performance optimizer. Across 99 programs from major websites, it improves performance 18.7% over Skia’s modern GPU backend with optimization under 32 μs.

Show HN: Automatically detect and patch walking-dead states in Sierra games

github.com · 19 Aug

Algorithms · Programming Languages · Testing

lucasartsifier decompiles Sierra SCI games, abstract-interprets their scripts into a graph, detects softlocks, derives and verifies protective guards, and recompiles reversible patches.

Tested on four SCI0/SCI1.1 titles, it requires no game-specific declarations and supports Full, Lite, and Off modes. Remaining limitations include required-action modeling, Quest For Glory state explosion, SCI1.0/AGI support, and incomplete end-to-end testing.

Celebrating Tony Hoare's mark on computer science

bertrandmeyer.com · 16 Mar

Algorithms · Programming Languages · Computer Science

This article honors the late Tony Hoare, a foundational figure in computer science.

It highlights his pivotal contributions, including the Quicksort algorithm, Hoare logic (axiomatic semantics), and Communicating Sequential Processes (CSP). Beyond his research, the text reflects on his academic leadership, mentorship, and his lasting influence on formal methods and programming methodology.

UTF-8000: Unlimited UTF-8

utf-8000.jb2170.com · 20 Sept

Algorithms · Open Source · Computer Science

UTF-8000 is a standalone proposal extending UTF-8 to arbitrarily large unsigned integers/codepoints.

It preserves ASCII compatibility, byte-level self-synchronization, self-punctuation, unique non-overlong encodings, lexicographic strcmp(3) ordering, and bitwise simplicity by distributing start bits across continuation bytes. A Python reference implementation is available, alongside experimental signed, UTF-16K, and UTF-32K variants; it is not a Unicode standard.

raphlinus/nibnib

github.com · 30 Oct

Algorithms · Performance

nibnib is an image format optimized for extreme decompression speed on constrained devices such as the RP2350.

It stores RGB 565 images using a 256-entry palette of 32-bit color deltas: each input byte decodes two pixels by adding a palette delta to the duplicated previous pixel, achieving 4bpp and roughly six cycles per pixel. Floyd-Steinberg error diffusion improves quality, while encoding is much slower and quality-focused; the compact format has minimal metadata and supports decoder-preserving encoder improvements.

Anatomy of a Lean proof for software engineers

agostbiro.net · 1 Oct

Algorithms · Programming Languages · Computer Science

This tutorial formalizes a finite-automata proof in Lean.

It specifies a language of three-bit columns whose bottom row equals the sum of the top two, implements an adder DFA that recognizes the reversed language using carry states, and proves correctness with an inductive run invariant. Mathlib’s finite-state and reversal-closure theorems then establish the original language is regular.

Saving Jet Fuel

tech.marksblogg.com · 15 Sept

Algorithms · Python · Open Source

An open-source flight-planning workflow combines scikit-decide, OpenAP, NOAA weather data, OpenTop, Python, and DuckDB to optimize aircraft routes for fuel, time, and contrail costs.

A* planning produced wind-aware Toulouse–Berlin and Toulouse–Warsaw routes, while OpenTop compared A320 and B737 trajectories, demonstrating practical fuel savings and alternative environmental objectives.

Stealing from Biologists to Compile Haskell Faster

iankduncan.com · 30 May

Algorithms · Backend · Performance

The author optimized GHC's ApplicativeDo compiler feature, which was previously disabled by default due to high latency.

By identifying logical bounds and leveraging properties shared with RNA-folding algorithms—specifically the nested, non-crossing constraints of dynamic programming—the author reduced the O(n³) complexity, making the optimal scheduling algorithm practical for real-world Haskell code.

In Memoriam: John W. Addison, my PhD advisor

billwadge.com · 15 Mar

Algorithms · Mathematics · Computer Science

The scientific community mourns John Addison (1930–2025), a distinguished UC Berkeley professor and logician.

His work on model theory, definability, and the Baire space significantly influenced computer science, particularly in semantics and dataflow programming. Addison is remembered for his elegant notation, his mentorship under Church and Kleene, and his profound impact on academic descendants.

Faster Than Dijkstra?

systemsapproach.org · 9 Feb

Algorithms · Performance · Computer Science

A recent breakthrough in network theory claims to surpass Dijkstra's algorithm by breaking the sorting barrier to improve performance bounds.

However, practical implementation in routers remains unlikely because current network sizes don't reach scaling limits where the difference is significant, and other factors like failure detection dominate routing convergence times.

Binary fuse filters: Fast and smaller than xor filters (2022)

arxiv.org · 4 Jan

Algorithms · Data Science · Computer Science

Binary fuse filters are introduced as a novel probabilistic data structure for approximate set membership, offering better memory efficiency than traditional Bloom, cuckoo, and xor filters.

These filters stay within 13% of the theoretical storage lower bound while maintaining high query speeds and providing significantly faster construction times. Experimental results demonstrate their superiority over various competitive alternatives, including ribbon filters and blocked Bloom filters.

Clojure: Transducers

clojure.org · 20 Apr

Algorithms · Software Architecture · Computer Science

Transducers in Clojure are composable, context-independent algorithmic transformations that decouple logic from input and output sources.

They transform reducing functions, enabling efficient data processing across collections, channels, and streams without creating intermediate structures. By using function composition, they provide a powerful, reusable mechanism for modular data transformation and stateful operations.

Quadrupling code performance with a "useless" if

purplesyringa.moe · 12 Jul

Algorithms · Low-Level Programming · Performance

Optimizing a domain-specific compressor loop involves resolving a data dependency bottleneck.

By leveraging branch prediction to speculate that the state remains unchanged, the algorithm shifts from latency-bound to throughput-bound. Using a volatile cast preserves the branch logic, effectively bypassing compiler optimizations to enhance execution speed through speculative hardware execution.

Intent to Ship: JPEG XL

hacks.mozilla.org · 24 Aug

Algorithms · Performance · Rust

Firefox intends to ship JPEG XL using jxl-rs, a secure, performant Rust decoder developed by Google Research to replace a 100,000-line multithreaded C++ implementation.

JPEG XL adds progressive rendering and excels at lossless compression, while AVIF generally produces smaller web-quality photos. Developers should benchmark both formats using representative images and target quality levels.

Spherical Voronoi Diagram

jasondavies.com · 3 Jun

Algorithms · Mathematics · Computer Science

This project implements a Voronoi diagram on a spherical surface by computing the 3D convex hull of points.

Using a randomized incremental algorithm, the spherical Delaunay triangulation is derived, effectively partitioning the globe into regions based on proximity to seed points. Development is ongoing.

A Primer on Bézier Curves – So What Makes a Bézier Curve?

pomax.github.io · 28 Apr

Algorithms · Computer Science · AI Agents

This primer explains Bézier curves: mathematical parametric functions fundamental to computer graphics, CAD, and vector design.

It covers their construction using Bernstein polynomials, implementational details like de Casteljau's algorithm, and complex operations such as intersections, offsetting, fitting, and curvature analysis, providing essential techniques for developers and designers working with interactive vector graphics.

Chrome extension adjusts video speed based on how fast the speaker is talking

github.com · 13 Mar

Algorithms · JavaScript · Productivity

This Chrome extension dynamically adjusts video playback speed to normalize speech to a target syllable rate.

It uses the Web Audio API to isolate vowel formants, applies an energy-envelope modulation algorithm with zero-crossing detection to estimate the speaker's natural pace, and uses exponential moving averages to smoothly adjust video playback in real-time for improved efficiency.

How JPEG works: Interactively explore JPEG's lossy compression methods

cgjennings.ca · 27 Jul

Algorithms · Data Science · Computer Science

JPEG remains successful due to its effective lossy compression, which leverages human visual perception.

By converting images to YCbCr color space, discarding less visible color data, applying frequency transforms, and using strategically quantized blocks, JPEG achieves significant file size reduction. The process is reversed during decoding, where interpolation and color space conversion recover the final image.

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