Hey everyone, I’ve hit one of my lazy cycles again (and honestly, since I churned through quite a bit of material earlier, there isn’t that much backlog left anyway), so I’ll be switching to roughly 1–2 posts a week depending on my mood. Also, last week my idol ✨🌙 recommended the book Tìm mình trong thế giới hậu tuổi thơ (Finding Yourself in the Post-Childhood World), which is quite a good read—feel free to check it out if you’re interested. For now, enjoy Newsletter #51.

p-fast trie: lexically ordered hash map

Tony Finch sketches out a data structure idea that even he isn’t sure is actually a good one: the “p-fast trie,” a hash map that preserves the lexicographical order of its keys. Instead of maintaining a tree with internal pointers like a qp-trie, a p-fast trie stores every proper prefix of every key in a hash map partitioned by prefix length, where each prefix corresponds to an internal branch node. Keys are treated as bit strings sliced into 6-bit chunks; each internal node contains a 64-bit bitmap marking which next chunks exist, along with a popcount-compressed array pointing to the nearest preceding leaf. The leaves themselves are linked into a circular doubly linked list in sorted order, so finding the preceding leaf immediately gives you the succeeding one as well. As a result, exact lookups take a single O(1) hash map probe, while predecessor/successor queries use binary search over the prefix length, achieving O(log k) instead of O(k) like a qp-trie (where k is the key length).

The author is candid about its weaknesses: a p-fast trie uses far more memory because it requires so many internal nodes, insertions and deletions must update multiple prefixes at once—making concurrent access hard to implement safely—and jumping around across long prefixes is much less friendly to CPU caches than a qp-trie. Its remaining advantage is that predecessor/successor searches only require one pass rather than two. A concise read for anyone interested in how an engineer weighs trade-offs when designing data structures.

Big O vs Hardware: Better Complexity ≠ Better Performance

Abhinav Upadhyay demonstrates that better asymptotic complexity does not guarantee faster execution on real hardware. He grounds his analysis in the “Iron Law” of processor performance: execution time depends on the number of instructions executed and the number of instructions the CPU completes per cycle (IPC). The article compares three algorithms for computing the greatest common divisor (GCD): Euclid’s subtraction algorithm at O(max(a, b)), Euclid’s modulo algorithm at O(log(max(a, b))), and Stein’s binary GCD algorithm. For very large inputs, the modulo version is roughly 10,000 times faster than the subtraction version. Yet for a = 130000, b = 13, the subtraction version—despite looping nearly 10,000 times—finishes earlier than the modulo version, which needs only a single step, because on Intel Skylake integer addition/subtraction has a 1-cycle latency and can execute 4 instructions per cycle, whereas integer division has a latency of 42–95 cycles.

Stein’s algorithm is much more hardware-friendly: it replaces division with bit shifts and trailing-zero counts, keeping the instruction count low while maintaining high IPC. In the author’s benchmark across number pairs in [1, 100000) with a step of 5, Stein’s algorithm came out fastest; the modulo version executed the fewest instructions (13 billion) but achieved an IPC of just 0.15, making it the slowest overall, whereas the subtraction version executed 97 billion instructions and still finished 1.5 seconds earlier. The takeaway: Big O still matters at scale, but real-world speed requires understanding instruction costs on modern CPUs, profiling with tools like perf, and considering hybrid algorithms tailored to input size.

Claude Code Is All You Need

Gareth Dwyer, a long-time vim user, reflects on several weeks with Claude Code, Anthropic’s terminal-based AI coding tool, sharing three main takeaways: give it high autonomy (he runs it with permission prompts bypassed, even on live servers), feed it plenty of input because output quality scales with context, and note that it designs surprisingly good UIs. A standout example is SmartSplit, a Splitwise clone generated in one shot from a ~500-word specification file; still, the model remains inconsistent, and a vague spec produced a completely broken app. He also found the model writes PHP remarkably well and argues that frameworks exist mainly to serve humans rather than AI.

According to the author, Claude Code’s power comes from a simple loop that calls the model repeatedly. He tried extending that loop into an “autonomous startup” on a VPS: Claude wrote its own prompts, picked an idea, and stood up a full web application complete with Nginx and TLS certificates—even though its product idea made no sense—before eventually getting blocked for violating usage policies. On real work, Claude Code helped him migrate an unfamiliar Laravel/MySQL application to a cheap VPS, saving an estimated 16–32 hours, though it still needed his supervision. Other projects included a Hacker News comment-scoring plugin, a poster generator, and categorizing bank statements. As for the article itself, he wrote nearly all of it by hand, finding that the model is much better at organizing existing material than at creative writing.

HTTP is not simple

Daniel Stenberg—author of curl, with nearly three decades of writing client-side HTTP code and contributing to HTTP specifications at the IETF—pushes back against the notion that “HTTP is a simple protocol.” HTTP/1 looks approachable because it is human-readable text and anyone can telnet into a server and type GET by hand, but the machinery underneath is anything but simple. Headers are line-oriented with no specification limit on line length, terminated by CRLF (or sometimes bare LF), and consist of raw octets rather than UTF-8. Whitespace is mandatory in some places and optional in others, and tokens may or may not be quoted. There are at least three ways to determine where a response body ends (Content-Length, chunked transfer encoding, Connection: close)—the source of countless security vulnerabilities; parsing numbers in text form requires handling overflow, signs, and leading zeros; and headers can be combined or “folded” across multiple lines.

On top of that, features exist in the spec that rarely work reliably in practice, such as pipelining or 100 Continue responses; sending a request body with GET lacks broad interoperability (prompting the proposed QUERY method); and browsers routinely guess user intent instead of rejecting malformed input, forcing other HTTP clients to mimic browser quirks rather than strictly following the spec. “HTTP/1.1” appears in at least 40 RFCs, and RFCs 9110–9112 alone run 95,740 words—over seven hours of nonstop reading. The author suggests complexity may simply be the price of success, as DNS and SMTP also started out simple before growing complex over time, and HTTP will only get more complex from here.

Building a web search engine from scratch in two months with 3 billion neural embeddings

Wilson Lin chronicles his two-month journey building a web search engine from scratch, motivated by two observations: traditional search results are increasingly overrun with SEO spam, while transformer-based text embedding models have become remarkably good at understanding natural language. His goal was to capture the intent of a full query rather than matching keywords. Web pages are normalized to strip out menus, footers, and comment sections, keeping only semantically meaningful prose, which is then split into sentences using spaCy; each sentence is augmented with context from section headings or lead-in lines before lists so indirect references don’t lose their meaning.

At scale, a cluster of 200 GPUs generated 3 billion SBERT embeddings, while hundreds of crawlers peaked at 50,000 pages per second to index 280 million pages; RocksDB and HNSW were sharded across 200 CPU cores, 4 TB of RAM, and 82 TB of SSD storage, delivering end-to-end query latency around 500 ms. The post also explains why he had to abandon object storage and then PostgreSQL in favor of RocksDB, and how combining Hetzner, Oracle Cloud, and Runpod kept infrastructure costs dozens of times cheaper than AWS. His two biggest takeaways: quantity has a quality all its own, because a search engine is useless if it hasn’t indexed what you’re looking for; and crawling and content filtering are the hardest parts of the job. Next steps include leveraging Common Crawl, adopting static embedding models, rewriting the crawler in Rust, and curating a high-signal index.

Bonus: Cool diagrams from ByteByteGo

What is the SOLID Principle? Common HTTP Status Codes How Clean Architecture Works? How does Docker Work? A Guide to Top Caching Strategies


This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.