Cursor can now search millions of files and find results in milliseconds. This dramatically speeds up how fast agents complete tasks. We're sharing how we built Instant Grep, including the algorithms and tradeoffs behind the design. https://t.co/uzqMUgHvYn
Cursor Instant Grep Cuts Codebase Search from 16.8s to 13ms
· Updated
Cursor's Instant Grep is a client-side search index that speeds up regex queries in large codebases. It builds an inverted index using sparse n-gram decomposition — a variable-length indexing technique that minimizes posting lookups and narrows candidate files with high specificity. Queries that took 15 seconds in Chromium now complete in 13ms. The index syncs on Git commits, staying fresh without full rebuilds.
Keeping the index on the user's machine eliminates the network roundtrips that would otherwise slow every search. Since agents search constantly and often in parallel, this keeps Composer 2 running without stalls. The speed difference is most noticeable in enterprise monorepos.
Instant Grep is already shipped and works with Composer 2. Point your agent at a large codebase and let the index handle grep — the iteration loop is faster when search no longer introduces multi-second delays.
Cursor
@cursor_ai
300retweets
View on X

