cabbala

the_silver_searcher- 比ack还要快的搜索工具

  •  
  •   cabbala · Jan 8, 2013 · 4971 views
    This topic created in 4911 days ago, the information mentioned may be changed or developed.
    https://github.com/ggreer/the_silver_searcher#how-is-it-so-fast

    尝试了下,比ack快多了,完虐grep当然更是毫无压力。

    安装后用法和ack类似,ag xxx即可

    How is it so fast?
    Searching for literals (no regex) uses Boyer-Moore-Horspool strstr.
    Files are mmap()ed instead of read into a buffer.
    If you're building with PCRE 8.21 or greater, regex searches use the JIT compiler.
    Ag calls pcre_study() before executing the regex on a jillion files.
    Instead of calling fnmatch() on every pattern in your ignore files, non-regex patterns are loaded into an array and binary searched.
    Ag uses Pthreads to take advantage of multiple CPU cores and search files in parallel.
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2381 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 204ms · UTC 01:40 · PVG 09:40 · LAX 18:40 · JFK 21:40
    ♥ Do have faith in what you're doing.