Nerd-sniped: Project Search
Zed's project search had throughput close to ripgrep's, but the first result arrived very late. The cause was task starvation: the few tasks that confirmed matches in known-matching files were queued with the same priority as the flood of candidate-file scans, so they rarely got scheduled until nearly everything else had run. Restructuring the per-thread search loop with Rust's `select_biased!` to prioritize full-match scans over new file scans cut time-to-first-match from 3.8s to 1.1s on the Linux repo and from 16.8s to 32ms on the Rust compiler repo, while slightly improving total throughput. Remaining work includes streaming match paths for remote projects, keeping the UI responsive under very many matches, and closing the remaining throughput gap with ripgrep.
Related posts
- Enabling the parallel frontend on nightly
Rust Blog mediumAdept
Rust nightly now runs the compiler frontend (type checking, borrow checking) in parallel by default since nightly-2026-11-14, to surface bugs ahead of stabilization. In single-crate benchmarks with 8 threads, mean wall time dropped about 44% for check and 28% for opt builds, with some crates like nalgebra, cargo and diesel checking nearly 3x faster. Gains shrink when Cargo and LLVM already saturate the cores: an end-to-end cargo check of the whole crate graph improved only about 15%, and incremental rebuilds improved 3-5%. Nightly defaults to 2 frontend threads to limit memory growth; use -Zunstable-options --jobs-frontend=N to tune it or set N=1 to opt out, and expect nondeterministic diagnostic order and possible reproducibility bugs.
- This Week at Zed Industries: #1
Zed mediumAdeptZed grew out of Xray, the experimental editor Nathan Sobo and Antonio worked on at GitHub in 2018, and this weekly update recaps the path from there to a company and a private alpha. It also describes the team's first "quality week" of bug fixing, which they plan to repeat every six weeks. Multibuffer performance in project-wide search got much faster after two fixes. Rope fingerprints, computed with the monoid-homomorphic bromberg_sl2 hash and aggregated through a B-tree, are now stored as HashMatrix values instead of allocated Strings. Excerpts are also built on a background thread and streamed into the multibuffer so the main thread no longer blocks.
- Eliminating Data Races in Firefox – A Technical Report
Mozilla Hacks hardMasterMozilla deployed ThreadSanitizer across Firefox's C/C++ and Rust code, using a compiled-in suppression list to gate new races in CI while legacy ones were triaged toward a "no data races" policy. So-called benign races are easily misclassified, yet fixing them proved cheap: most fixes were atomics conversions, suppressions or code removal. Notable finds include lost writes from adjacent bitfields (fixed with a MOZ_ATOMIC_BITFIELDS macro), a PreferencesWriter race likely corrupting prefs.js, and fragile late-validated racy reads. Rust needed -Zbuild-std hacks for instrumentation but surfaced only two pure-Rust races, in parking_lot and a WebRender shim, both in unsafe low-level code.
- Fast regex search: indexing text for agent tools · Cursor
Cursor mediumAdept
Agents lean heavily on regex search, and ripgrep's full scan can take over 15 seconds in large monorepos, so Cursor builds local indexes specifically to accelerate regex queries. The post traces the lineage of regex indexing: n-gram inverted indexes from Zobel et al. (1993) and Russ Cox's Google Code Search trigram approach, including how regexes are decomposed into trigram AND/OR queries, then livegrep's suffix arrays and GitHub Project Blackbird's trigram posting lists augmented with probabilistic masks (position and next-character bloom filters) to approximate '3.5-grams'. It weighs the tradeoffs of each: index size, query decomposition cost, and difficulty of dynamic updates.
- We Have to Start Over: From Atom to Zed
Zed easyNoviceZed's co-founders explain why they abandoned Atom's Electron/JavaScript stack and rebuilt a code editor in Rust: JavaScript's pointer-chasing arrays, uncontrollable GC pauses, and the costly JS/C++ boundary for multithreading made performance work feel like fighting the platform. Rust's ownership model pushed them toward a copy-on-write B-tree (SumTree) rope built on Arc, letting snapshots move to background threads in O(1), and high-level Rust code cut a find-all-matches operation from 1s to 4ms. GPU rendering with custom shaders and signed distance fields came out of necessity after Pathfinder proved too slow. Owning the stack (Tree-sitter, GPUI) lets them change anything, such as adding WASM language extensions, at the cost of building more themselves.