{
 "article": "https://w.n14n.dev/string-algorithms/",
 "title": "String algorithms",
 "how_to_cite": "Cite the source of a claim, not this article. The article is an AI-written summary.",
 "how_claims_link": "A section lists the claims of the sources it cites, so a claim supports the section, not one sentence.",
 "verified_values": {
  "verified": "a verifier found the quote on the source page",
  "rejected": "a verifier read the source page and did not find the quote, or found it does not support the claim",
  "blocked": "a verifier could not open the source page, so the quote is unconfirmed",
  "unchecked": "never put to a verifier"
 },
 "read_values": {
  "raw": "the full text was read",
  "extracted": "large parts of the text were read",
  "abstract": "only the abstract was read",
  "snippet": "only a search snippet or summary was read",
  "blocked": "the page could not be opened"
 },
 "grade_values": {
  "solid": "the research rated the source highly trustworthy, and a verifier found every passage taken from it",
  "weak": "the research rated the source low, or a verifier did not find a passage taken from it",
  "medium": "the research rated the source medium; neither weak nor solid",
  "unchecked": "the research rated the source high, but a verifier could not check every passage taken from it (page blocked or not checked)",
  "retracted": "the work was retracted or withdrawn after publication; the article cites it only to say so"
 },
 "evidence_values": {
  "contested": "studies disagree on this",
  "weak": "few or small studies support this",
  "failed-replication": "when the study was repeated, the original result did not appear",
  "strong": "many studies agree on this",
  "replicated": "when other teams repeated the study, the original result appeared again",
  "null": "no note: the article does not single out the section's evidence"
 },
 "sections": [
  {
   "title": "Lead",
   "anchor": "lead",
   "evidence": null,
   "claims": [
    "string-algorithms:C-sam-1",
    "string-algorithms:C-sam-2",
    "string-algorithms:C-sam-3",
    "string-algorithms:C-sam-4",
    "string-algorithms:C-rhea-28",
    "string-algorithms:C-rhea-29",
    "string-algorithms:C-rhea-30",
    "string-algorithms:C-alex-1",
    "string-algorithms:C-alex-2",
    "string-algorithms:C-alex-3",
    "string-algorithms:C-alex-5"
   ]
  },
  {
   "title": "Searching for one pattern",
   "anchor": "searching-for-one-pattern",
   "evidence": null,
   "claims": [
    "string-algorithms:C-sam-1",
    "string-algorithms:C-sam-2",
    "string-algorithms:C-sam-3",
    "string-algorithms:C-sam-4",
    "string-algorithms:C-sam-10"
   ]
  },
  {
   "title": "Setup cost and one-off searches",
   "anchor": "setup-cost-and-one-off-searches",
   "evidence": "weak",
   "claims": [
    "string-algorithms:C-rhea-29",
    "string-algorithms:C-rhea-28",
    "string-algorithms:C-rhea-30"
   ]
  },
  {
   "title": "What standard libraries ship",
   "anchor": "what-standard-libraries-ship",
   "evidence": null,
   "claims": [
    "string-algorithms:C-rhea-27",
    "string-algorithms:C-rhea-20",
    "string-algorithms:C-rhea-26",
    "string-algorithms:C-rhea-21",
    "string-algorithms:C-rhea-22",
    "string-algorithms:C-rhea-24",
    "string-algorithms:C-rhea-23",
    "string-algorithms:C-rhea-25"
   ]
  },
  {
   "title": "Searching for many patterns at once",
   "anchor": "searching-for-many-patterns-at-once",
   "evidence": null,
   "claims": [
    "string-algorithms:C-sam-5",
    "string-algorithms:C-sam-6",
    "string-algorithms:C-sam-7",
    "string-algorithms:C-sam-8",
    "string-algorithms:C-sam-9",
    "string-algorithms:C-sam-15"
   ]
  },
  {
   "title": "How automaton engines work",
   "anchor": "how-automaton-engines-work",
   "evidence": null,
   "claims": [
    "string-algorithms:C-rhea-2",
    "string-algorithms:C-rhea-3",
    "string-algorithms:C-rhea-4",
    "string-algorithms:C-rhea-17",
    "string-algorithms:C-rhea-15",
    "string-algorithms:C-rhea-16"
   ]
  },
  {
   "title": "What linear-time guarantees cover",
   "anchor": "what-linear-time-guarantees-cover",
   "evidence": null,
   "claims": [
    "string-algorithms:C-rhea-6",
    "string-algorithms:C-rhea-10",
    "string-algorithms:C-rhea-8",
    "string-algorithms:C-rhea-9",
    "string-algorithms:C-rhea-1",
    "string-algorithms:C-rhea-5",
    "string-algorithms:C-sam-22"
   ]
  },
  {
   "title": "Catastrophic backtracking and ReDoS",
   "anchor": "catastrophic-backtracking-and-redos",
   "evidence": null,
   "claims": [
    "string-algorithms:C-rhea-9",
    "string-algorithms:C-rhea-8",
    "string-algorithms:C-rhea-7",
    "string-algorithms:C-rhea-18",
    "string-algorithms:C-rhea-19"
   ]
  },
  {
   "title": "Inside grep and ripgrep",
   "anchor": "inside-grep-and-ripgrep",
   "evidence": null,
   "claims": [
    "string-algorithms:C-rhea-11",
    "string-algorithms:C-rhea-12",
    "string-algorithms:C-rhea-13",
    "string-algorithms:C-rhea-14"
   ]
  },
  {
   "title": "Indexes for repeated searches",
   "anchor": "indexes-for-repeated-searches",
   "evidence": null,
   "claims": [
    "string-algorithms:C-alex-5",
    "string-algorithms:C-alex-1",
    "string-algorithms:C-alex-2",
    "string-algorithms:C-alex-3",
    "string-algorithms:C-alex-4",
    "string-algorithms:C-sam-19",
    "string-algorithms:C-sam-18"
   ]
  },
  {
   "title": "Edit distance and fuzzy matching",
   "anchor": "edit-distance-and-fuzzy-matching",
   "evidence": null,
   "claims": [
    "string-algorithms:C-sam-16",
    "string-algorithms:C-sam-17",
    "string-algorithms:C-sam-11",
    "string-algorithms:C-sam-13",
    "string-algorithms:C-sam-14",
    "string-algorithms:C-sam-12"
   ]
  },
  {
   "title": "Further reading",
   "anchor": "further-reading",
   "evidence": null,
   "claims": [
    "string-algorithms:C-sam-1",
    "string-algorithms:C-sam-2",
    "string-algorithms:C-sam-7",
    "string-algorithms:C-sam-8",
    "string-algorithms:C-rhea-18",
    "string-algorithms:C-rhea-7",
    "string-algorithms:C-rhea-1",
    "string-algorithms:C-rhea-5",
    "string-algorithms:C-alex-1",
    "string-algorithms:C-alex-2",
    "string-algorithms:C-alex-3",
    "string-algorithms:C-alex-5",
    "string-algorithms:C-rhea-12"
   ]
  }
 ],
 "claims": [
  {
   "id": "string-algorithms:C-sam-1",
   "claim": "In the authors’ comparison, SIMD-naïve counted matches fastest for patterns up to about 50 symbols.",
   "quote": "the fastest one for patterns of length up to about 50 symbols",
   "source": {
    "id": "string-algorithms:S-sam-1",
    "key": "tarhio2017",
    "author": "Tarhio, Jorma and Holub, Jan and Giaquinta, Emanuele",
    "year": "2017",
    "title": "Technology beats algorithms (in exact string matching)",
    "publisher": "Software: Practice and Experience",
    "url": "https://onlinelibrary.wiley.com/doi/full/10.1002/spe.2511",
    "in_text": "Tarhio et al. (2017)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "Peer-reviewed research article with original comparative measurements and a reproducible protocol."
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "lead",
    "searching-for-one-pattern",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-sam-2",
   "claim": "EPSM and SBNDM4 had an advantage over the authors’ frequency-ordered SIMD search for long patterns on small alphabets.",
   "quote": "previous algorithms EPSM and SBNDM4 have an advantage for small alphabets and long patterns",
   "source": {
    "id": "string-algorithms:S-sam-1",
    "key": "tarhio2017",
    "author": "Tarhio, Jorma and Holub, Jan and Giaquinta, Emanuele",
    "year": "2017",
    "title": "Technology beats algorithms (in exact string matching)",
    "publisher": "Software: Practice and Experience",
    "url": "https://onlinelibrary.wiley.com/doi/full/10.1002/spe.2511",
    "in_text": "Tarhio et al. (2017)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "Peer-reviewed research article with original comparative measurements and a reproducible protocol."
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "lead",
    "searching-for-one-pattern",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-sam-3",
   "claim": "On uniformly random inputs, Marino and Tarhio found that SSB and similar methods fared better in the region with longer patterns and larger alphabets.",
   "quote": "For longer patterns and larger alphabets, the performance landscape shifts, favoring approaches such as SSB, which has been designed for long patterns.",
   "source": {
    "id": "string-algorithms:S-sam-2",
    "key": "marino2026",
    "author": "Marino, Francesco Pio and Tarhio, Jorma",
    "year": "2026",
    "title": "Improving string matching through enhanced hashing",
    "publisher": "Software: Practice and Experience",
    "url": "https://onlinelibrary.wiley.com/doi/10.1002/spe.70087?af=R",
    "in_text": "Marino & Tarhio (2026)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "Peer-reviewed research article with original comparative measurements and a reproducible protocol."
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "lead",
    "searching-for-one-pattern"
   ]
  },
  {
   "id": "string-algorithms:C-sam-4",
   "claim": "The revised SMART benchmark’s largest English-text speedup for the CRC32C-64 EPSM variant over original EPSM was 5.3 times at pattern length 4,096.",
   "quote": "Method  | X-Hash  | M-Hash  | CRC32C-64  | CRC32\n--- | --- | --- | --- | ---\nAlgorithm  | WFR$$$ {}_{08\\mathrm{X}} $$$  | EPSM$$$ {}_{08\\mathrm{M}} $$$  | EPSM$$$ {}_{16\\mathrm{C}8} $$$  | WFR$$$ {}_{08\\mathrm{C}4} $$$\nRef. algorithm  | WFR$$$ {}_{08} $$$  | EPSM  | EPSM  | EPSM\n$$$ m $$$  | 32768  | 4096  | 4096  | 1024\nSpeedup  | 3.1  | 4.4  | 5.3  | 2.9",
   "source": {
    "id": "string-algorithms:S-sam-2",
    "key": "marino2026",
    "author": "Marino, Francesco Pio and Tarhio, Jorma",
    "year": "2026",
    "title": "Improving string matching through enhanced hashing",
    "publisher": "Software: Practice and Experience",
    "url": "https://onlinelibrary.wiley.com/doi/10.1002/spe.70087?af=R",
    "in_text": "Marino & Tarhio (2026)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "Peer-reviewed research article with original comparative measurements and a reproducible protocol."
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "lead",
    "searching-for-one-pattern"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-28",
   "claim": "Rust memchr uses Rabin–Karp for very small haystacks to reduce latency.",
   "quote": "Rabin-Karp is used to reduce latency. Rabin-Karp has very small overhead and can often complete before other searchers have even been constructed.",
   "source": {
    "id": "string-algorithms:S-rhea-19",
    "key": "memchr",
    "author": "Gallant, Andrew and {memchr contributors}",
    "year": "n.d.",
    "title": "memchr",
    "publisher": "GitHub",
    "url": "https://github.com/BurntSushi/memchr",
    "in_text": "Gallant & memchr contributors (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "medium",
    "trust_reason": "maintainer's README on own library; benchmarks with tool and method named but self-evaluated, std comparison not like for like"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "lead",
    "setup-cost-and-one-off-searches"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-29",
   "claim": "In the maintainer's comparison of memchr 2.5.0 to a Rust 1.73 nightly standard library, including construction narrowed memchr's advantage across the benchmark suite.",
   "quote": "The difference is a little smaller when you include construction time in your measurements.",
   "source": {
    "id": "string-algorithms:S-rhea-19",
    "key": "memchr",
    "author": "Gallant, Andrew and {memchr contributors}",
    "year": "n.d.",
    "title": "memchr",
    "publisher": "GitHub",
    "url": "https://github.com/BurntSushi/memchr",
    "in_text": "Gallant & memchr contributors (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "medium",
    "trust_reason": "maintainer's README on own library; benchmarks with tool and method named but self-evaluated, std comparison not like for like"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "lead",
    "setup-cost-and-one-off-searches"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-30",
   "claim": "The memchr project notes that its prebuilt benchmark for the standard library approximates preprocessing reuse with a match iterator because the API cannot omit construction.",
   "quote": "The prebuilt benchmark for the standard library can't actually avoid measuring searcher construction at some level, because there is no API for it.",
   "source": {
    "id": "string-algorithms:S-rhea-19",
    "key": "memchr",
    "author": "Gallant, Andrew and {memchr contributors}",
    "year": "n.d.",
    "title": "memchr",
    "publisher": "GitHub",
    "url": "https://github.com/BurntSushi/memchr",
    "in_text": "Gallant & memchr contributors (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "medium",
    "trust_reason": "maintainer's README on own library; benchmarks with tool and method named but self-evaluated, std comparison not like for like"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "lead",
    "setup-cost-and-one-off-searches"
   ]
  },
  {
   "id": "string-algorithms:C-alex-1",
   "claim": "In the 2008 Pizza&Chili counting benchmark, the plain suffix array on English text took 0.512 microseconds per pattern symbol at a total size of 5 times the text, while the alphabet-friendly FM-index took 2.694 at 0.42 times the text without locate and extract support.",
   "quote": "english | **2.147** | 0.60 | 2.694 | **0.42** | 4.758 | **0.44** | 68.774 | 1.27 | 0.512 | 5",
   "source": {
    "id": "string-algorithms:S-alex-1",
    "key": "ferragina2008",
    "author": "Ferragina, Paolo and González, Rodrigo and Navarro, Gonzalo and Venturini, Rossano",
    "year": "2008",
    "title": "Compressed text indexes: From theory to practice",
    "publisher": "ACM Journal of Experimental Algorithmics",
    "url": "https://pages.di.unipi.it/rossano/assets/pdf/papers/JEA08.pdf",
    "in_text": "Ferragina et al. (2008)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own survey with experiments in ACM JEA; method shown; no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "lead",
    "indexes-for-repeated-searches",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-alex-2",
   "claim": "In the same study locating tests for five-symbol patterns, the authors reported that the plain suffix array took between 100 and 1,000 times less time per occurrence than any tested compressed index, using five times the size of the text.",
   "quote": "it is between 100 and 1,000 times faster than any compressed index, but always 5 times larger than the indexed text.",
   "source": {
    "id": "string-algorithms:S-alex-1",
    "key": "ferragina2008",
    "author": "Ferragina, Paolo and González, Rodrigo and Navarro, Gonzalo and Venturini, Rossano",
    "year": "2008",
    "title": "Compressed text indexes: From theory to practice",
    "publisher": "ACM Journal of Experimental Algorithmics",
    "url": "https://pages.di.unipi.it/rossano/assets/pdf/papers/JEA08.pdf",
    "in_text": "Ferragina et al. (2008)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own survey with experiments in ACM JEA; method shown; no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "lead",
    "indexes-for-repeated-searches",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-alex-3",
   "claim": "A compressed full-text self-index can recover substrings directly, replacing the original text.",
   "quote": "those indexes are able to reproduce any text portion without accessing the original text, and thus they *replace* the text",
   "source": {
    "id": "string-algorithms:S-alex-1",
    "key": "ferragina2008",
    "author": "Ferragina, Paolo and González, Rodrigo and Navarro, Gonzalo and Venturini, Rossano",
    "year": "2008",
    "title": "Compressed text indexes: From theory to practice",
    "publisher": "ACM Journal of Experimental Algorithmics",
    "url": "https://pages.di.unipi.it/rossano/assets/pdf/papers/JEA08.pdf",
    "in_text": "Ferragina et al. (2008)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own survey with experiments in ACM JEA; method shown; no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "lead",
    "indexes-for-repeated-searches",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-alex-5",
   "claim": "A positional word inverted index stores each word's occurrence positions and can answer phrase queries by intersecting lists.",
   "quote": "An inverted list is essentially a table recording the positions of the occurrences of every distinct word in the indexed text. Thus every word-based query is already pre-computed, and phrase queries are carried out via list intersections.",
   "source": {
    "id": "string-algorithms:S-alex-1",
    "key": "ferragina2008",
    "author": "Ferragina, Paolo and González, Rodrigo and Navarro, Gonzalo and Venturini, Rossano",
    "year": "2008",
    "title": "Compressed text indexes: From theory to practice",
    "publisher": "ACM Journal of Experimental Algorithmics",
    "url": "https://pages.di.unipi.it/rossano/assets/pdf/papers/JEA08.pdf",
    "in_text": "Ferragina et al. (2008)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own survey with experiments in ACM JEA; method shown; no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "lead",
    "indexes-for-repeated-searches",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-sam-10",
   "claim": "The AVX2 follow-on reports a larger EPSMA improvement over the original EPSM when the pattern has fewer than 16 symbols.",
   "quote": "Running time difference between EPSMA and EPSM algorithms becomes more evident when pattern length is smaller than 16.",
   "source": {
    "id": "string-algorithms:S-sam-6",
    "key": "aydogmus2019",
    "author": "Aydoğmuş, Mehmet Akif and Külekci, M. Oğuzhan",
    "year": "2019",
    "title": "Optimizing packed string matching on AVX2 platform",
    "publisher": "High Performance Computing for Computational Science, VECPAR 2018",
    "url": "https://www.academia.edu/41955916/Optimizing_Packed_String_Matching_on_AVX2_Platform",
    "in_text": "Aydoğmuş & Külekci (2019)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "medium",
    "trust_reason": "Conference comparison of tuned implementations by their developers with results scoped to the test platform."
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "searching-for-one-pattern"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-27",
   "claim": "Python 3.14 documents str.find as returning the lowest position within the requested slice where the substring is found, or -1 when absent.",
   "quote": "Return the lowest index in the string where substring sub is found within the slice s[start:end]. Optional arguments start and end are interpreted as in slice notation. Return -1 if sub is not found.",
   "source": {
    "id": "string-algorithms:S-rhea-18",
    "key": "pythonstdtypes",
    "author": "{Python Software Foundation}",
    "year": "n.d.a",
    "title": "Built-in types",
    "publisher": "Python 3.14 documentation",
    "url": "https://docs.python.org/3.14/builtins/stdtypes.html#str.find",
    "in_text": "Foundation (n.d.a)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "maintainer's reference for its own language; describes behaviour only"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-standard-libraries-ship"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-20",
   "claim": "CPython 3.14's forward substring search can switch adaptively to Two-Way after partial comparisons accumulate proportional to needle length.",
   "quote": "here's an adaptive version of the algorithm, where if we match O(m) characters without any matches of the entire needle, then we predict that the startup cost of the two-way algorithm will probably be worth it.",
   "source": {
    "id": "string-algorithms:S-rhea-13",
    "key": "cpythonfastsearch",
    "author": "{Python Software Foundation}",
    "year": "n.d.o",
    "title": "fastsearch.h",
    "publisher": "CPython v3.14.0",
    "url": "https://raw.githubusercontent.com/python/cpython/v3.14.0/Objects/stringlib/fastsearch.h",
    "in_text": "Foundation (n.d.o)",
    "type": "documentation",
    "read": "raw",
    "trust": "high",
    "trust_reason": "maintainer's own source with comments describing its algorithms; no benchmarks claimed"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-standard-libraries-ship"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-26",
   "claim": "Go's strings.Index documents first occurrence or -1 when absent, and the Go 1.25.0 code delegates to stringslite.Index.",
   "quote": "// Index returns the index of the first instance of substr in s, or -1 if substr is not present in s.\nfunc Index(s, substr string) int {\n\treturn stringslite.Index(s, substr)\n}",
   "source": {
    "id": "string-algorithms:S-rhea-17",
    "key": "gostrings",
    "author": "{The Go Authors}",
    "year": "n.d.d",
    "title": "strings.go, public strings package",
    "publisher": "Go 1.25.0",
    "url": "https://raw.githubusercontent.com/golang/go/go1.25.0/src/strings/strings.go",
    "in_text": "Authors (n.d.d)",
    "type": "documentation",
    "read": "raw",
    "trust": "high",
    "trust_reason": "maintainers own source code describing what it does; no evaluation claims"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-standard-libraries-ship"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-21",
   "claim": "Go 1.25's internal string search switches to bytealg.IndexString on its short-needle path if first-byte scanning returns too many false positives.",
   "quote": "Switch to bytealg.IndexString when IndexByte produces too many false positives.",
   "source": {
    "id": "string-algorithms:S-rhea-14",
    "key": "gostringslite",
    "author": "{The Go Authors}",
    "year": "n.d.c",
    "title": "strings.go, internal substring search",
    "publisher": "Go 1.25.0",
    "url": "https://raw.githubusercontent.com/golang/go/go1.25.0/src/internal/stringslite/strings.go",
    "in_text": "Authors (n.d.c)",
    "type": "other",
    "read": "raw",
    "trust": "high",
    "trust_reason": "maintainers own source code, describes what the code does; no evaluation"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-standard-libraries-ship"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-22",
   "claim": "On Go 1.25's long-needle path the implementation can switch to Rabin–Karp after enough failed candidate checks.",
   "quote": "if fails >= 4+i>>4 && i < t {\n\t\t\t// See comment in ../bytes/bytes.go.\n\t\t\tj := bytealg.IndexRabinKarp(s[i:], substr)",
   "source": {
    "id": "string-algorithms:S-rhea-14",
    "key": "gostringslite",
    "author": "{The Go Authors}",
    "year": "n.d.c",
    "title": "strings.go, internal substring search",
    "publisher": "Go 1.25.0",
    "url": "https://raw.githubusercontent.com/golang/go/go1.25.0/src/internal/stringslite/strings.go",
    "in_text": "Authors (n.d.c)",
    "type": "other",
    "read": "raw",
    "trust": "high",
    "trust_reason": "maintainers own source code, describes what the code does; no evaluation"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-standard-libraries-ship"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-24",
   "claim": "Java String.indexOf documents that it returns the index of the first occurrence of the substring, or -1 when absent.",
   "quote": "the index of the first occurrence of the specified substring,\n     *          or {@code -1} if there is no such occurrence.",
   "source": {
    "id": "string-algorithms:S-rhea-15",
    "key": "openjdkstring",
    "author": "{Oracle and/or its affiliates}",
    "year": "n.d.a",
    "title": "String.java",
    "publisher": "OpenJDK 25 build 36",
    "url": "https://raw.githubusercontent.com/openjdk/jdk/jdk-25%2B36/src/java.base/share/classes/java/lang/String.java",
    "in_text": "affiliates (n.d.a)",
    "type": "documentation",
    "read": "raw",
    "trust": "high",
    "trust_reason": "the owner's own source code of its product, describes what it does without evaluating it"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-standard-libraries-ship"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-23",
   "claim": "OpenJDK 25's String.indexOf routes equal-encoding pairs to a Latin-1 or UTF-16 search routine.",
   "quote": "return isLatin1() ? StringLatin1.indexOf(value, str.value)\n                              : StringUTF16.indexOf(value, str.value);",
   "source": {
    "id": "string-algorithms:S-rhea-15",
    "key": "openjdkstring",
    "author": "{Oracle and/or its affiliates}",
    "year": "n.d.a",
    "title": "String.java",
    "publisher": "OpenJDK 25 build 36",
    "url": "https://raw.githubusercontent.com/openjdk/jdk/jdk-25%2B36/src/java.base/share/classes/java/lang/String.java",
    "in_text": "affiliates (n.d.a)",
    "type": "documentation",
    "read": "raw",
    "trust": "high",
    "trust_reason": "the owner's own source code of its product, describes what it does without evaluating it"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-standard-libraries-ship"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-25",
   "claim": "OpenJDK 25 marks its Latin-1 substring search as an intrinsic candidate.",
   "quote": "@IntrinsicCandidate\n    public static int indexOf(byte[] value, byte[] str)",
   "source": {
    "id": "string-algorithms:S-rhea-16",
    "key": "openjdklatin1",
    "author": "{Oracle and/or its affiliates}",
    "year": "n.d.b",
    "title": "StringLatin1.java",
    "publisher": "OpenJDK 25 build 36",
    "url": "https://raw.githubusercontent.com/openjdk/jdk/jdk-25%2B36/src/java.base/share/classes/java/lang/StringLatin1.java",
    "in_text": "affiliates (n.d.b)",
    "type": "other",
    "read": "raw",
    "trust": "high",
    "trust_reason": "Oracle's own source code for its product; describes how it works, no evaluation"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-standard-libraries-ship"
   ]
  },
  {
   "id": "string-algorithms:C-sam-5",
   "claim": "The Rust aho-corasick crate can use Teddy to confirm matches directly, allowing it to skip the Aho–Corasick automaton.",
   "quote": "it confirms its own matches, so when Teddy is active, it might not be necessary for Aho-Corasick to run at all.",
   "source": {
    "id": "string-algorithms:S-sam-3",
    "key": "ahocorasickdesign",
    "author": "Gallant, Andrew",
    "year": "n.d.",
    "title": "DESIGN.md (aho-corasick 1.1.5)",
    "publisher": "Docs.rs",
    "url": "https://docs.rs/crate/aho-corasick/latest/source/DESIGN.md",
    "in_text": "Gallant (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "maintainer's design document of its own crate; describes how it works, no evaluation"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "searching-for-many-patterns-at-once"
   ]
  },
  {
   "id": "string-algorithms:C-sam-6",
   "claim": "The crate switches from Teddy to Rabin–Karp for haystacks below Teddy’s minimum length.",
   "quote": "When the haystack is shorter than that, Rabin-Karp is used instead.",
   "source": {
    "id": "string-algorithms:S-sam-3",
    "key": "ahocorasickdesign",
    "author": "Gallant, Andrew",
    "year": "n.d.",
    "title": "DESIGN.md (aho-corasick 1.1.5)",
    "publisher": "Docs.rs",
    "url": "https://docs.rs/crate/aho-corasick/latest/source/DESIGN.md",
    "in_text": "Gallant (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "maintainer's design document of its own crate; describes how it works, no evaluation"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "searching-for-many-patterns-at-once"
   ]
  },
  {
   "id": "string-algorithms:C-sam-7",
   "claim": "In the Vaporetto Japanese tokenizer benchmark, character-wise Daachorse took 2.9 microseconds per sentence versus 7.3 for DFA-AC and 7.5 for NFA-AC.",
   "quote": "Charwise-Daachorse performed in 2.9 microseconds per sentence,\n\n  * •\n\nNFA-AC performed in 7.5 microseconds per sentence, and\n\n  * •\n\nDFA-AC performed in 7.3 microseconds per sentence.",
   "source": {
    "id": "string-algorithms:S-sam-4",
    "key": "kanda2023",
    "author": "Kanda, Shunsuke and Akabe, Koichi and Oda, Yusuke",
    "year": "2023",
    "title": "Engineering faster double-array Aho–Corasick automata",
    "publisher": "Software: Practice and Experience",
    "url": "https://arxiv.org/html/2207.13870",
    "in_text": "Kanda et al. (2023)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own algorithms with experiments on named datasets shown; page names published version; no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "searching-for-many-patterns-at-once",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-sam-8",
   "claim": "Character-wise and mapped Daachorse variants matched faster than the byte-wise variant on the two Japanese datasets, with fewer random accesses.",
   "quote": "On JaWord and JaChars, Charwise and Mapped are faster than Bytewise because of their fewer random accesses.",
   "source": {
    "id": "string-algorithms:S-sam-4",
    "key": "kanda2023",
    "author": "Kanda, Shunsuke and Akabe, Koichi and Oda, Yusuke",
    "year": "2023",
    "title": "Engineering faster double-array Aho–Corasick automata",
    "publisher": "Software: Practice and Experience",
    "url": "https://arxiv.org/html/2207.13870",
    "in_text": "Kanda et al. (2023)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own algorithms with experiments on named datasets shown; page names published version; no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "searching-for-many-patterns-at-once",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-sam-9",
   "claim": "For 10,000 random eight-symbol patterns on a 256-symbol alphabet, the paper reports HG 16 times faster than its Aho–Corasick comparison.",
   "quote": "HG is 16 times faster than the well-known Aho-Corasick algorithm in the case of random patterns for \\(r=10,000\\), \\(m=8\\), and \\(c=256\\).",
   "source": {
    "id": "string-algorithms:S-sam-5",
    "key": "salmela2006",
    "author": "Salmela, Leena and Tarhio, Jorma and Kytöjoki, Jari",
    "year": "2006",
    "title": "Multi-pattern string matching with q-grams",
    "publisher": "ACM Journal of Experimental Algorithmics",
    "url": "https://users.aalto.fi/~tarhio/papers/jea.pdf",
    "in_text": "Salmela et al. (2006)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "medium",
    "trust_reason": "own algorithms and experiments, setup shown; authors compare their own algorithms with earlier ones"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "searching-for-many-patterns-at-once"
   ]
  },
  {
   "id": "string-algorithms:C-sam-15",
   "claim": "In the English corpus benchmark for 10,000 patterns of length 32, Multi AOSO on q-Grams slightly exceeded 100 MB/s and Shift-Or on q-grams and the tested Rabin–Karp variant ran ten times slower.",
   "quote": "for r = 10, 000 and relatively long patterns (m = 32) only MAG slightly exceeds\n100 MB/s (the worst ones here, SOG and RK, are 10 times slower).",
   "source": {
    "id": "string-algorithms:S-sam-10",
    "key": "susik2014",
    "author": "Susik, Robert and Grabowski, Szymon and Fredriksson, Kimmo",
    "year": "2014",
    "title": "Multiple pattern matching revisited",
    "publisher": "arXiv",
    "url": "https://arxiv.org/pdf/1405.5483",
    "in_text": "Susik et al. (2014)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own algorithm with experiments shown in paper; no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "searching-for-many-patterns-at-once"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-2",
   "claim": "A Thompson NFA search maintains a set of states and advances each across its possible transitions for an input symbol.",
   "quote": "Namely, in order to execute a search for any Thompson NFA, one needs to keep track of a set of states, and execute the possible transitions on all of those states for each input symbol.",
   "source": {
    "id": "string-algorithms:S-rhea-2",
    "key": "regexautomata",
    "author": "{Rust regex-automata contributors}",
    "year": "n.d.",
    "title": "NFA in regex_automata::nfa::thompson - Rust",
    "publisher": "Docs.rs",
    "url": "https://docs.rs/regex-automata/latest/regex_automata/nfa/thompson/struct.NFA.html",
    "in_text": "contributors (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "low",
    "trust_reason": "maintainers document own crate; also states DFA about an order of magnitude faster than NFA with no data or method"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "how-automaton-engines-work"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-3",
   "claim": "A DFA can take exponential time or space to build.",
   "quote": "A DFA, on the other hand, may take exponential time and/or space to build.",
   "source": {
    "id": "string-algorithms:S-rhea-2",
    "key": "regexautomata",
    "author": "{Rust regex-automata contributors}",
    "year": "n.d.",
    "title": "NFA in regex_automata::nfa::thompson - Rust",
    "publisher": "Docs.rs",
    "url": "https://docs.rs/regex-automata/latest/regex_automata/nfa/thompson/struct.NFA.html",
    "in_text": "contributors (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "low",
    "trust_reason": "maintainers document own crate; also states DFA about an order of magnitude faster than NFA with no data or method"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "how-automaton-engines-work"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-4",
   "claim": "The Rust regex-automata hybrid NFA/DFA avoids the exponential build time of a DFA.",
   "quote": "It avoids the exponential build time of a DFA while maintaining its fast search time.",
   "source": {
    "id": "string-algorithms:S-rhea-2",
    "key": "regexautomata",
    "author": "{Rust regex-automata contributors}",
    "year": "n.d.",
    "title": "NFA in regex_automata::nfa::thompson - Rust",
    "publisher": "Docs.rs",
    "url": "https://docs.rs/regex-automata/latest/regex_automata/nfa/thompson/struct.NFA.html",
    "in_text": "contributors (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "low",
    "trust_reason": "maintainers document own crate; also states DFA about an order of magnitude faster than NFA with no data or method"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "how-automaton-engines-work"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-17",
   "claim": "The .NET 7 non-backtracking matcher starts with a lazy DFA and switches to NFA processing if its DFA graph grows too large.",
   "quote": "the implementation starts with a DFA, building out the nodes lazily, and at some point if the graph gets too big, it switches over dynamically to NFA-based processing",
   "source": {
    "id": "string-algorithms:S-rhea-11",
    "key": "toub2022",
    "author": "Toub, Stephen",
    "year": "2022",
    "title": "Regular expression improvements in .NET 7",
    "publisher": ".NET Blog",
    "url": "https://devblogs.microsoft.com/dotnet/regular-expression-improvements-in-dotnet-7/",
    "in_text": "Toub (2022)",
    "type": "vendor",
    "read": "extracted",
    "trust": "medium",
    "trust_reason": "Microsoft post on own platform; benchmarks with code shown but own machine and promotional claims; interested party, checkable"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "how-automaton-engines-work"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-15",
   "claim": "In the 2019 Symbolic Regex Matcher evaluation, compiling a pattern into a matcher took longer in SRM than in RE2 or .NET.",
   "quote": "Compilation of regular expressions into matcher objects takes more time in SRM than RE2 or .NET.",
   "source": {
    "id": "string-algorithms:S-rhea-10",
    "key": "saarikivi2019",
    "author": "Saarikivi, Olli and Veanes, Margus and Wan, Tiki and Xu, Eric",
    "year": "2019",
    "title": "Symbolic regex matcher",
    "publisher": "Tools and Algorithms for the Construction and Analysis of Systems",
    "url": "https://www.microsoft.com/en-us/research/wp-content/uploads/2019/02/SRM_tacas19.pdf",
    "in_text": "Saarikivi et al. (2019)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "Primary conference paper with separately measured compilation and matching."
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "how-automaton-engines-work"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-16",
   "claim": "On the Assorted benchmark, SRM had a lower mean matching time than RE2, which the authors attribute to RE2's more severe outliers.",
   "quote": "While SRM achieves a lower average matching time on Assorted, this is due to the more severe outliers in RE2’s performance profile",
   "source": {
    "id": "string-algorithms:S-rhea-10",
    "key": "saarikivi2019",
    "author": "Saarikivi, Olli and Veanes, Margus and Wan, Tiki and Xu, Eric",
    "year": "2019",
    "title": "Symbolic regex matcher",
    "publisher": "Tools and Algorithms for the Construction and Analysis of Systems",
    "url": "https://www.microsoft.com/en-us/research/wp-content/uploads/2019/02/SRM_tacas19.pdf",
    "in_text": "Saarikivi et al. (2019)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "Primary conference paper with separately measured compilation and matching."
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "how-automaton-engines-work"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-6",
   "claim": "RE2 guarantees match time linear in text length.",
   "quote": "One of its primary guarantees is that the match time is linear in the length of the input string.",
   "source": {
    "id": "string-algorithms:S-rhea-3",
    "key": "re2",
    "author": "{RE2 contributors}",
    "year": "n.d.",
    "title": "RE2",
    "publisher": "GitHub",
    "url": "https://github.com/google/re2",
    "in_text": "contributors (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "describes own library's goals and guarantees; no evaluation results; maintainer page"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-linear-time-guarantees-cover"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-10",
   "claim": "Go's standard regexp package guarantees linear time in input size.",
   "quote": "The regexp implementation provided by this package is guaranteed to run in time linear in the size of the input.",
   "source": {
    "id": "string-algorithms:S-rhea-6",
    "key": "goregexp2026",
    "author": "{The Go Authors}",
    "year": "2026b",
    "title": "regexp package - regexp",
    "publisher": "Go Packages",
    "url": "https://pkg.go.dev/regexp",
    "in_text": "Authors (2026b)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "maintainer's own package reference; describes what it does"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-linear-time-guarantees-cover"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-8",
   "claim": ".NET's NonBacktracking mode is designed for search time proportional to text length.",
   "quote": "This mode is designed to execute in time proportional to the length of the input.",
   "source": {
    "id": "string-algorithms:S-rhea-5",
    "key": "microsoft2023",
    "author": "{Microsoft}",
    "year": "2023",
    "title": "Backtracking in regular expressions",
    "publisher": "Microsoft Learn",
    "url": "https://learn.microsoft.com/en-us/dotnet/standard/base-types/backtracking-in-regular-expressions",
    "in_text": "Microsoft (2023)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "vendor documentation describing how its own regex engine works; no evaluative claims"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-linear-time-guarantees-cover",
    "catastrophic-backtracking-and-redos"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-9",
   "claim": "Microsoft recommends a timeout when a backtracking regex relies on backtracking or receives untrusted input.",
   "quote": "we recommend that you always set a time-out interval if your regular expression relies on backtracking or operates on untrusted inputs.",
   "source": {
    "id": "string-algorithms:S-rhea-5",
    "key": "microsoft2023",
    "author": "{Microsoft}",
    "year": "2023",
    "title": "Backtracking in regular expressions",
    "publisher": "Microsoft Learn",
    "url": "https://learn.microsoft.com/en-us/dotnet/standard/base-types/backtracking-in-regular-expressions",
    "in_text": "Microsoft (2023)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "vendor documentation describing how its own regex engine works; no evaluative claims"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-linear-time-guarantees-cover",
    "catastrophic-backtracking-and-redos"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-1",
   "claim": "A single Rust regex search has worst-case O(m × n) time, with m proportional to pattern size and n proportional to text size.",
   "quote": "In exchange, all regex searches in this crate have worst case O(m * n) time complexity, where m is proportional to the size of the regex and n is proportional to the size of the string being searched.",
   "source": {
    "id": "string-algorithms:S-rhea-1",
    "key": "rustregex",
    "author": "{Rust regex contributors}",
    "year": "n.d.",
    "title": "regex - Rust",
    "publisher": "Docs.rs",
    "url": "https://docs.rs/regex/latest/regex/",
    "in_text": "contributors (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "maintainers describe own crate behavior; performance remarks qualitative only"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-linear-time-guarantees-cover",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-5",
   "claim": "Rust regex documents worst-case O(m × n²) for its match iterators because they can repeatedly scan the haystack.",
   "quote": "the worst case time complexity for iterators is O(m * n^2).",
   "source": {
    "id": "string-algorithms:S-rhea-1",
    "key": "rustregex",
    "author": "{Rust regex contributors}",
    "year": "n.d.",
    "title": "regex - Rust",
    "publisher": "Docs.rs",
    "url": "https://docs.rs/regex/latest/regex/",
    "in_text": "contributors (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "maintainers describe own crate behavior; performance remarks qualitative only"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-linear-time-guarantees-cover",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-sam-22",
   "claim": "RE# supports restricted lookarounds and its authors prove that its main matching algorithm is input-linear.",
   "quote": "We develop the theory formally and show that the main matching algorithm has input-linear complexity both in theory as well as experimentally.",
   "source": {
    "id": "string-algorithms:S-sam-15",
    "key": "varatalu2025",
    "author": "Varatalu, Ian Erik and Veanes, Margus and Ernits, Juhan",
    "year": "2025",
    "title": "RE#: High performance derivative-based regex matching with intersection, complement, and restricted lookarounds",
    "publisher": "Proceedings of the ACM on Programming Languages",
    "url": "https://www.microsoft.com/en-us/research/wp-content/uploads/2025/01/popl25-p2-final.pdf",
    "in_text": "Varatalu et al. (2025)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "medium",
    "trust_reason": "own benchmarks of authors' own tool vs other engines; method shown and artifact public so checkable, but authors gain from the result"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "what-linear-time-guarantees-cover"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-7",
   "claim": "A 2018 ecosystem study reported thousands of superlinear regular expressions affecting over 10,000 modules across JavaScript and Python.",
   "quote": "we detected thousands of super-linear regexes affecting over 10,000 modules across diverse application domains.",
   "source": {
    "id": "string-algorithms:S-rhea-4",
    "key": "davis2018",
    "author": "Davis, James C. and Coghlan, Christy A. and Servant, Francisco and Lee, Dongyoon",
    "year": "2018",
    "title": "The impact of regular expression denial of service (ReDoS) in practice: An empirical study at the ecosystem scale",
    "publisher": "Proceedings of the 26th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 18)",
    "url": "https://davisjam.github.io/files/publications/DavisCoghlanServantLee-EcosystemREDOS-ESECFSE18.pdf",
    "in_text": "Davis et al. (2018)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own empirical study; method and data shown; public funding; no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "catastrophic-backtracking-and-redos",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-18",
   "claim": "The 2018 ecosystem study did not confirm whether the superlinear regexes it found were exploitable in deployment.",
   "quote": "we did not perform taint analysis to confirm that malign input could reach these regexes",
   "source": {
    "id": "string-algorithms:S-rhea-4",
    "key": "davis2018",
    "author": "Davis, James C. and Coghlan, Christy A. and Servant, Francisco and Lee, Dongyoon",
    "year": "2018",
    "title": "The impact of regular expression denial of service (ReDoS) in practice: An empirical study at the ecosystem scale",
    "publisher": "Proceedings of the 26th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 18)",
    "url": "https://davisjam.github.io/files/publications/DavisCoghlanServantLee-EcosystemREDOS-ESECFSE18.pdf",
    "in_text": "Davis et al. (2018)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own empirical study; method and data shown; public funding; no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "catastrophic-backtracking-and-redos",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-19",
   "claim": "Barlas and colleagues reported six vulnerable domains in a sample of 475 with OpenAPI specifications.",
   "quote": "there were 475 web domains; 83 of them document their input sanitization regexes; and 6 of these (15 distinct subdomains) are vulnerable to ReDoS.",
   "source": {
    "id": "string-algorithms:S-rhea-12",
    "key": "barlas2022",
    "author": "Barlas, Efe and Du, Xin and Davis, James C.",
    "year": "2022",
    "title": "Exploiting input sanitization for regex denial of service",
    "publisher": "44th International Conference on Software Engineering",
    "url": "https://davisjam.github.io/files/publications/BarlasDuDavis-WebREDOS-ICSE2022.pdf",
    "in_text": "Barlas et al. (2022)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own measurement study of 1,000 domains and 475 APIs; method and validity threats shown; no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "catastrophic-backtracking-and-redos"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-11",
   "claim": "GNU grep 3.11 uses a lazy deterministic matcher and fixed-string Boyer–Moore and Aho–Corasick filters.",
   "quote": "GNU grep is based on a fast lazy-state deterministic matcher hybridized with Boyer-Moore and Aho-Corasick searches for fixed strings",
   "source": {
    "id": "string-algorithms:S-rhea-7",
    "key": "fsf2023",
    "author": "{Free Software Foundation}",
    "year": "2023",
    "title": "GNU grep 3.11 README",
    "publisher": "GNU grep 3.11 source distribution",
    "url": "https://sources.debian.org/src/grep/3.11-4/README",
    "in_text": "Foundation (2023)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "Maintainer documentation for the library and its implementation."
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "inside-grep-and-ripgrep"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-12",
   "claim": "Gallant describes verifying only lines that the literal filter identifies as candidates.",
   "quote": "when a candidate line is found, `ripgrep` will find the beginning and end of only that line, and then run the full regex engine on the entire line.",
   "source": {
    "id": "string-algorithms:S-rhea-8",
    "key": "gallant2016",
    "author": "Gallant, Andrew",
    "year": "2016",
    "title": "ripgrep is faster than grep, ag, git grep, ucg, pt, sift",
    "publisher": "Andrew Gallant's Blog",
    "url": "https://burntsushi.net/ripgrep/",
    "in_text": "Gallant (2016)",
    "type": "blog",
    "read": "extracted",
    "trust": "medium",
    "trust_reason": "author benchmarks his own tool; method and environment shown, reproducible; benefit claims from interested author"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "inside-grep-and-ripgrep",
    "further-reading"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-13",
   "claim": "The ripgrep project reports that high match counts often narrow tool differences because match handling dominates.",
   "quote": "high match counts also tend to both tank performance and smooth out the differences between tools",
   "source": {
    "id": "string-algorithms:S-rhea-9",
    "key": "ripgrep",
    "author": "Gallant, Andrew and {ripgrep contributors}",
    "year": "n.d.",
    "title": "ripgrep",
    "publisher": "GitHub",
    "url": "https://github.com/BurntSushi/ripgrep",
    "in_text": "Gallant & ripgrep contributors (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "medium",
    "trust_reason": "maintainer README describes own tool; benchmark claims by interested author, commands and hardware given but single machine"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "inside-grep-and-ripgrep"
   ]
  },
  {
   "id": "string-algorithms:C-rhea-14",
   "claim": "The ripgrep README reports sharp slowdowns across tools when regexes on large files offer no literal optimization.",
   "quote": "performance can drop precipitously across the board when searching big files for patterns without any opportunities for literal optimizations",
   "source": {
    "id": "string-algorithms:S-rhea-9",
    "key": "ripgrep",
    "author": "Gallant, Andrew and {ripgrep contributors}",
    "year": "n.d.",
    "title": "ripgrep",
    "publisher": "GitHub",
    "url": "https://github.com/BurntSushi/ripgrep",
    "in_text": "Gallant & ripgrep contributors (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "medium",
    "trust_reason": "maintainer README describes own tool; benchmark claims by interested author, commands and hardware given but single machine"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "inside-grep-and-ripgrep"
   ]
  },
  {
   "id": "string-algorithms:C-alex-4",
   "claim": "In the 2006 Puglisi, Smyth and Turpin comparison of compressed suffix arrays and q-gram inverted files, the inverted files located patterns faster at comparable memory when there were many occurrences.",
   "quote": "When using equivalent memory for the two structures, inverted files are faster at reporting the location of patterns when the number of occurrences of the patterns is high.",
   "source": {
    "id": "string-algorithms:S-alex-2",
    "key": "puglisi2006",
    "author": "Puglisi, S. J. and Smyth, W. F. and Turpin, A.",
    "year": "2006",
    "title": "Inverted files versus suffix arrays for locating patterns in primary memory",
    "publisher": "String Processing and Information Retrieval",
    "url": "https://researchportal.murdoch.edu.au/esploro/outputs/journalArticle/Inverted-files-versus-suffix-arrays-for/991005541091207891",
    "in_text": "Puglisi et al. (2006)",
    "type": "peer-reviewed",
    "read": "abstract",
    "trust": "medium",
    "trust_reason": "Primary comparison, with only the author's abstract on the university record reviewed."
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "indexes-for-repeated-searches"
   ]
  },
  {
   "id": "string-algorithms:C-sam-19",
   "claim": "The authors report that recovering positions for every match in a suffix-array range makes co-occurrence impractical in their FM-index system.",
   "quote": "mapping every match from the suffix array range back to its position in original text takes very long time",
   "source": {
    "id": "string-algorithms:S-sam-12",
    "key": "xu2025h",
    "author": "Xu, Hao and Liu, Jiacheng and Choi, Yejin and Smith, Noah A. and Hajishirzi, Hannaneh",
    "year": "2025f",
    "title": "Infini-gram mini: Exact n-gram search at the internet scale with FM-index",
    "publisher": "Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing",
    "url": "https://aclanthology.org/2025.emnlp-main.1268.pdf",
    "in_text": "Xu et al. (2025f)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own system and benchmarks; method and measurements shown; no stake stated"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "indexes-for-repeated-searches"
   ]
  },
  {
   "id": "string-algorithms:C-sam-18",
   "claim": "Infini-gram Mini authors report document retrieval latency remains higher than a canonical suffix array.",
   "quote": "document retrieval latency remains higher than a canonical suffix array.",
   "source": {
    "id": "string-algorithms:S-sam-12",
    "key": "xu2025h",
    "author": "Xu, Hao and Liu, Jiacheng and Choi, Yejin and Smith, Noah A. and Hajishirzi, Hannaneh",
    "year": "2025f",
    "title": "Infini-gram mini: Exact n-gram search at the internet scale with FM-index",
    "publisher": "Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing",
    "url": "https://aclanthology.org/2025.emnlp-main.1268.pdf",
    "in_text": "Xu et al. (2025f)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own system and benchmarks; method and measurements shown; no stake stated"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "indexes-for-repeated-searches"
   ]
  },
  {
   "id": "string-algorithms:C-sam-16",
   "claim": "The benchmarked parallel algorithms compute Levenshtein distance with unit-cost insertions, deletions, and substitutions.",
   "quote": "In this paper, we use edit distance to refer to the Levenshtein distance, which allows for unit-cost single-character edits (insertions, deletions, substitutions).",
   "source": {
    "id": "string-algorithms:S-sam-11",
    "key": "ding2023",
    "author": "Ding, Xiangyun and Dong, Xiaojun and Gu, Yan and Liu, Youzhe and Sun, Yihan",
    "year": "2023",
    "title": "Efficient parallel output-sensitive edit distance",
    "publisher": "31st Annual European Symposium on Algorithms (ESA 2023)",
    "url": "https://drops.dagstuhl.de/storage/00lipics/lipics-vol274-esa2023/LIPIcs.ESA.2023.40/LIPIcs.ESA.2023.40.pdf",
    "in_text": "Ding et al. (2023)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own algorithms; theory and benchmarks shown, code archived; NSF funding, no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "edit-distance-and-fuzzy-matching"
   ]
  },
  {
   "id": "string-algorithms:C-sam-17",
   "claim": "On the authors’ real-world data, their blocked hashing approach generally had the advantage when edit distance k was small, as in the synthetic tests.",
   "quote": "The results are mostly consistent with our synthetic datasets, where BFS-B-HASH is more advantageous when k is small",
   "source": {
    "id": "string-algorithms:S-sam-11",
    "key": "ding2023",
    "author": "Ding, Xiangyun and Dong, Xiaojun and Gu, Yan and Liu, Youzhe and Sun, Yihan",
    "year": "2023",
    "title": "Efficient parallel output-sensitive edit distance",
    "publisher": "31st Annual European Symposium on Algorithms (ESA 2023)",
    "url": "https://drops.dagstuhl.de/storage/00lipics/lipics-vol274-esa2023/LIPIcs.ESA.2023.40/LIPIcs.ESA.2023.40.pdf",
    "in_text": "Ding et al. (2023)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own algorithms; theory and benchmarks shown, code archived; NSF funding, no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "edit-distance-and-fuzzy-matching"
   ]
  },
  {
   "id": "string-algorithms:C-sam-11",
   "claim": "For a single fuzzy-name query with a three-edit cutoff against 1,000 candidates, prepared bit-parallel Myers averaged 5.415 microseconds, while the author's bounded Ukkonen implementation averaged 51.068 microseconds.",
   "quote": "Each benchmark runs 1 query against 1000 candidates with `MaxDist = 3`. The bounded Myers kernel is the baseline (`Ratio = 1.00`); every other row is that many times slower:\nMethod  | Mean  | Ratio\n--- | --- | ---\nMyers_PreparedOnce_WithMaxDist  | 5.415 us  | 1.00\nMyers_PreparedOnce_NoMaxDist  | 21.652 us  | 4.00\nWagnerFischerReference_WithMaxDist  | 42.496 us  | 7.85\nUkkonenReference_WithMaxDist  | 51.068 us  | 9.43",
   "source": {
    "id": "string-algorithms:S-sam-7",
    "key": "hallman2026",
    "author": "Hallman, Connor",
    "year": "2026",
    "title": "Optimizing Levenshstein for fuzzy name matching",
    "publisher": "Connor Hallman (blog)",
    "url": "https://connorhallman.com/blog/optimizing-levenshtein",
    "in_text": "Hallman (2026)",
    "type": "blog",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own benchmark; code variants, setup (1 query vs 1000 candidates) and timings shown; no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "edit-distance-and-fuzzy-matching"
   ]
  },
  {
   "id": "string-algorithms:C-sam-13",
   "claim": "RapidFuzz documents a uniform-cost edit-distance path that uses mbleven when the cutoff is at most three, after the zero-cutoff special case.",
   "quote": "If score_cutoff is ≤ 3 the mbleven algorithm is used.",
   "source": {
    "id": "string-algorithms:S-sam-9",
    "key": "rapidfuzz",
    "author": "Bachmann, Max",
    "year": "n.d.",
    "title": "Levenshtein",
    "publisher": "RapidFuzz documentation",
    "url": "https://rapidfuzz.github.io/RapidFuzz/Usage/distance/Levenshtein.html",
    "in_text": "Bachmann (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "maintainer's own reference for its function; describes what it does; no evaluation"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "edit-distance-and-fuzzy-matching"
   ]
  },
  {
   "id": "string-algorithms:C-sam-14",
   "claim": "RapidFuzz documents a Wagner–Fischer dynamic program for generic edit costs.",
   "quote": "The implementation for other weights is based on Wagner-Fischer.",
   "source": {
    "id": "string-algorithms:S-sam-9",
    "key": "rapidfuzz",
    "author": "Bachmann, Max",
    "year": "n.d.",
    "title": "Levenshtein",
    "publisher": "RapidFuzz documentation",
    "url": "https://rapidfuzz.github.io/RapidFuzz/Usage/distance/Levenshtein.html",
    "in_text": "Bachmann (n.d.)",
    "type": "documentation",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "maintainer's own reference for its function; describes what it does; no evaluation"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "edit-distance-and-fuzzy-matching"
   ]
  },
  {
   "id": "string-algorithms:C-sam-12",
   "claim": "In the authors’ dictionary experiments, correction time at a fixed edit limit depended on how many matching candidates they expected, and that expectation decreased for longer query words.",
   "quote": "correction times for fixed distance bounds depend on the expected number of correction candidates, which decreases for longer input words.",
   "source": {
    "id": "string-algorithms:S-sam-8",
    "key": "mihov2004",
    "author": "Mihov, Stoyan and Schulz, Klaus U.",
    "year": "2004",
    "title": "Fast approximate search in large dictionaries",
    "publisher": "Computational Linguistics",
    "url": "https://www.cis.uni-muenchen.de/download/publikationen/fastapproxsearch.pdf",
    "in_text": "Mihov & Schulz (2004)",
    "type": "peer-reviewed",
    "read": "extracted",
    "trust": "high",
    "trust_reason": "own method and evaluation shown; dictionaries not people; funded by a foundation, no stake"
   },
   "verified": "verified",
   "captured": null,
   "cited_in": [
    "edit-distance-and-fuzzy-matching"
   ]
  }
 ],
 "sources": {
  "ahocorasickdesign": {
   "grade": "solid",
   "why": "Documentation, read in large part."
  },
  "aydogmus2019": {
   "grade": "medium",
   "why": "Peer-reviewed, read in large part."
  },
  "barlas2022": {
   "grade": "solid",
   "why": "Peer-reviewed, read in large part."
  },
  "cpythonfastsearch": {
   "grade": "solid",
   "why": "Documentation, read in full."
  },
  "davis2018": {
   "grade": "solid",
   "why": "Peer-reviewed, read in large part."
  },
  "ding2023": {
   "grade": "solid",
   "why": "Peer-reviewed, read in large part."
  },
  "ferragina2008": {
   "grade": "solid",
   "why": "Peer-reviewed, read in large part."
  },
  "fsf2023": {
   "grade": "solid",
   "why": "Documentation, read in large part."
  },
  "gallant2016": {
   "grade": "medium",
   "why": "Blog post, read in large part."
  },
  "goregexp2026": {
   "grade": "solid",
   "why": "Documentation, read in large part."
  },
  "gostrings": {
   "grade": "solid",
   "why": "Documentation, read in full."
  },
  "gostringslite": {
   "grade": "solid",
   "why": "Read in full."
  },
  "hallman2026": {
   "grade": "solid",
   "why": "Blog post, read in large part."
  },
  "kanda2023": {
   "grade": "solid",
   "why": "Peer-reviewed, read in large part."
  },
  "marino2026": {
   "grade": "solid",
   "why": "Peer-reviewed, read in large part."
  },
  "memchr": {
   "grade": "medium",
   "why": "Documentation, read in large part."
  },
  "microsoft2023": {
   "grade": "solid",
   "why": "Documentation, read in large part."
  },
  "mihov2004": {
   "grade": "solid",
   "why": "Peer-reviewed, read in large part."
  },
  "openjdklatin1": {
   "grade": "solid",
   "why": "Read in full."
  },
  "openjdkstring": {
   "grade": "solid",
   "why": "Documentation, read in full."
  },
  "puglisi2006": {
   "grade": "medium",
   "why": "Peer-reviewed, abstract only."
  },
  "pythonstdtypes": {
   "grade": "solid",
   "why": "Documentation, read in large part."
  },
  "rapidfuzz": {
   "grade": "solid",
   "why": "Documentation, read in large part."
  },
  "re2": {
   "grade": "solid",
   "why": "Documentation, read in large part."
  },
  "regexautomata": {
   "grade": "weak",
   "why": "Documentation, read in large part."
  },
  "ripgrep": {
   "grade": "medium",
   "why": "Documentation, read in large part."
  },
  "rustregex": {
   "grade": "solid",
   "why": "Documentation, read in large part."
  },
  "saarikivi2019": {
   "grade": "solid",
   "why": "Peer-reviewed, read in large part."
  },
  "salmela2006": {
   "grade": "medium",
   "why": "Peer-reviewed, read in large part."
  },
  "susik2014": {
   "grade": "solid",
   "why": "Peer-reviewed, read in large part."
  },
  "tarhio2017": {
   "grade": "solid",
   "why": "Peer-reviewed, read in large part."
  },
  "toub2022": {
   "grade": "medium",
   "why": "Vendor page, read in large part."
  },
  "varatalu2025": {
   "grade": "medium",
   "why": "Peer-reviewed, read in large part."
  },
  "xu2025h": {
   "grade": "solid",
   "why": "Peer-reviewed, read in large part."
  }
 }
}
