2018-04-29 09:29:52 -04:00
|
|
|
[package]
|
|
|
|
name = "grep-searcher"
|
2023-11-27 21:34:58 -05:00
|
|
|
version = "0.1.13" #:version
|
2018-04-29 09:29:52 -04:00
|
|
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
|
|
|
description = """
|
|
|
|
Fast line oriented regex searching as a library.
|
|
|
|
"""
|
|
|
|
documentation = "https://docs.rs/grep-searcher"
|
2020-02-28 17:31:43 -08:00
|
|
|
homepage = "https://github.com/BurntSushi/ripgrep/tree/master/crates/searcher"
|
|
|
|
repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/searcher"
|
2018-04-29 09:29:52 -04:00
|
|
|
readme = "README.md"
|
|
|
|
keywords = ["regex", "grep", "egrep", "search", "pattern"]
|
2022-05-09 04:52:11 -07:00
|
|
|
license = "Unlicense OR MIT"
|
2023-09-28 12:58:11 -04:00
|
|
|
edition = "2021"
|
2018-04-29 09:29:52 -04:00
|
|
|
|
|
|
|
[dependencies]
|
2023-09-28 12:58:11 -04:00
|
|
|
bstr = { version = "1.6.2", default-features = false, features = ["std"] }
|
|
|
|
encoding_rs = "0.8.33"
|
|
|
|
encoding_rs_io = "0.1.7"
|
2023-11-26 14:15:34 -05:00
|
|
|
grep-matcher = { version = "0.1.7", path = "../matcher" }
|
2023-09-28 12:58:11 -04:00
|
|
|
log = "0.4.20"
|
|
|
|
memchr = "2.6.3"
|
2023-11-26 13:31:31 -05:00
|
|
|
memmap = { package = "memmap2", version = "0.9.0" }
|
2018-04-29 09:29:52 -04:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2023-11-26 14:16:31 -05:00
|
|
|
grep-regex = { version = "0.1.12", path = "../regex" }
|
deps: drop bytecount in favor of memchr_iter(..).count()
As of the memchr 2.6 release, its Iterator::count method is specialized
to only count the number of occurrences instead of finding the offset of
each occurrence. This replaces ripgrep's use of the bytecount crate.
While micro-benchmarks suggest that memchr's method has better
throughput than bytecount, it turned out to be an illusion. Namely, on a
~13GB haystack prior to this change:
$ time rg-bytecount 'You killed my friend, my best friend, my lifelong friend!' OpenSubtitles2018.raw.en --line-number
441450441:- You killed my friend, my best friend, my lifelong friend!
real 1.473
user 1.186
sys 0.286
maxmem 12512 MB
faults 0
And then after:
$ time rg 'You killed my friend, my best friend, my lifelong friend!' OpenSubtitles2018.raw.en --line-number
441450441:- You killed my friend, my best friend, my lifelong friend!
real 1.532
user 1.280
sys 0.250
maxmem 12512 MB
faults 0
But perf is just about in the same ballpark. That's good enough for me
at the moment in order to drop the extra dependency.
I did this because the marginal cost of adding the Iterator::count()
specialization to memchr was extremely small.
2023-09-02 12:25:34 -04:00
|
|
|
regex = "1.9.5"
|
2018-04-29 09:29:52 -04:00
|
|
|
|
|
|
|
[features]
|
2024-03-07 09:31:22 -05:00
|
|
|
# These features are DEPRECATED. Runtime dispatch is used for SIMD now.
|
|
|
|
simd-accel = []
|
2019-01-19 09:52:10 -05:00
|
|
|
avx-accel = []
|