How can I efficiently search for a specific string in a large text file using C#?

This page summarizes the projects mentioned and recommended in the original post on /r/csharp

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • ripgrep

    ripgrep recursively searches directories for a regex pattern while respecting your gitignore

  • Right. The "generic SIMD" algorithm is one I'm quite familiar with and have implemented. It's what ripgrep uses for example, although it's a little smarter than "just take the first and last bytes." ripgrep tries to guess at which bytes are the best to pick to maximize throughput by reducing false positives in the initial candidate scan. You can see the implementation here: https://github.com/BurntSushi/memchr/tree/master/src/memmem

  • Apache Lucene

    Apache Lucene.NET

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • StreamRegex

    A .NET Standard 2.1+ Library to perform string parsing operations on Streams and StreamReaders. Includes Extensions for Regex.

  • nlc

    Line counter written in C# targeting .NET 6

  • fnlc

    A line-counter written in C# and using Intrinsics

  • Microsoft.IO.RecyclableMemoryStream

    A library to provide pooling for .NET MemoryStream objects to improve application performance.

  • Another suggestion to try, there is a tool provided by Microsoft called Microsoft.IO.RecyclableMemoryStream which greatly reduces the amount of memory to garbage collect when streaming large amounts of data.

  • rust-memchr

    Optimized string search routines for Rust.

  • Right. The "generic SIMD" algorithm is one I'm quite familiar with and have implemented. It's what ripgrep uses for example, although it's a little smarter than "just take the first and last bytes." ripgrep tries to guess at which bytes are the best to pick to maximize throughput by reducing false positives in the initial candidate scan. You can see the implementation here: https://github.com/BurntSushi/memchr/tree/master/src/memmem

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Potencializando Sua Experiência no Linux: Conheça as Ferramentas em Rust para um Desenvolvimento Eficiente

    5 projects | dev.to | 12 Dec 2023
  • amber, a code search & replace tool

    11 projects | news.ycombinator.com | 23 May 2024
  • why GNU grep is fast

    8 projects | /r/linux | 22 Feb 2023
  • ⚙️ Rust_Search an Speedy Alternative to GLOB ⚙️

    4 projects | /r/rust | 3 Nov 2022
  • Telescope grep features dont work on windows, how can i make them work?

    2 projects | /r/neovim | 29 Oct 2022