2018-04-29 15:29:52 +02:00
|
|
|
[package]
|
|
|
|
name = "grep-regex"
|
2019-08-06 15:51:13 +02:00
|
|
|
version = "0.1.5" #:version
|
2018-04-29 15:29:52 +02:00
|
|
|
authors = ["Andrew Gallant <jamslam@gmail.com>"]
|
|
|
|
description = """
|
|
|
|
Use Rust's regex library with the 'grep' crate.
|
|
|
|
"""
|
|
|
|
documentation = "https://docs.rs/grep-regex"
|
2020-02-29 03:31:43 +02:00
|
|
|
homepage = "https://github.com/BurntSushi/ripgrep/tree/master/crates/regex"
|
|
|
|
repository = "https://github.com/BurntSushi/ripgrep/tree/master/crates/regex"
|
2018-04-29 15:29:52 +02:00
|
|
|
readme = "README.md"
|
|
|
|
keywords = ["regex", "grep", "search", "pattern", "line"]
|
|
|
|
license = "Unlicense/MIT"
|
|
|
|
|
|
|
|
[dependencies]
|
regex: make multi-literal searcher faster
This makes the case of searching for a dictionary of a very large number
of literals much much faster. (~10x or so.) In particular, we achieve this
by short-circuiting the construction of a full regex when we know we have
a simple alternation of literals. Building the regex for a large dictionary
(>100,000 literals) turns out to be quite slow, even if it internally will
dispatch to Aho-Corasick.
Even that isn't quite enough. It turns out that even *parsing* such a regex
is quite slow. So when the -F/--fixed-strings flag is set, we short
circuit regex parsing completely and jump straight to Aho-Corasick.
We aren't quite as fast as GNU grep here, but it's much closer (less than
2x slower).
In general, this is somewhat of a hack. In particular, it seems plausible
that this optimization could be implemented entirely in the regex engine.
Unfortunately, the regex engine's internals are just not amenable to this
at all, so it would require a larger refactoring effort. For now, it's
good enough to add this fairly simple hack at a higher level.
Unfortunately, if you don't pass -F/--fixed-strings, then ripgrep will
be slower, because of the aforementioned missing optimization. Moreover,
passing flags like `-i` or `-S` will cause ripgrep to abandon this
optimization and fall back to something potentially much slower. Again,
this fix really needs to happen inside the regex engine, although we
might be able to special case -i when the input literals are pure ASCII
via Aho-Corasick's `ascii_case_insensitive`.
Fixes #497, Fixes #838
2019-04-08 00:43:01 +02:00
|
|
|
aho-corasick = "0.7.3"
|
2020-02-16 17:43:26 +02:00
|
|
|
bstr = "0.2.10"
|
2020-02-18 01:28:09 +02:00
|
|
|
grep-matcher = { version = "0.1.2", path = "../matcher" }
|
regex: make multi-literal searcher faster
This makes the case of searching for a dictionary of a very large number
of literals much much faster. (~10x or so.) In particular, we achieve this
by short-circuiting the construction of a full regex when we know we have
a simple alternation of literals. Building the regex for a large dictionary
(>100,000 literals) turns out to be quite slow, even if it internally will
dispatch to Aho-Corasick.
Even that isn't quite enough. It turns out that even *parsing* such a regex
is quite slow. So when the -F/--fixed-strings flag is set, we short
circuit regex parsing completely and jump straight to Aho-Corasick.
We aren't quite as fast as GNU grep here, but it's much closer (less than
2x slower).
In general, this is somewhat of a hack. In particular, it seems plausible
that this optimization could be implemented entirely in the regex engine.
Unfortunately, the regex engine's internals are just not amenable to this
at all, so it would require a larger refactoring effort. For now, it's
good enough to add this fairly simple hack at a higher level.
Unfortunately, if you don't pass -F/--fixed-strings, then ripgrep will
be slower, because of the aforementioned missing optimization. Moreover,
passing flags like `-i` or `-S` will cause ripgrep to abandon this
optimization and fall back to something potentially much slower. Again,
this fix really needs to happen inside the regex engine, although we
might be able to special case -i when the input literals are pure ASCII
via Aho-Corasick's `ascii_case_insensitive`.
Fixes #497, Fixes #838
2019-04-08 00:43:01 +02:00
|
|
|
log = "0.4.5"
|
2019-01-19 16:32:32 +02:00
|
|
|
regex = "1.1"
|
2019-01-26 19:25:21 +02:00
|
|
|
regex-syntax = "0.6.5"
|
2020-01-10 03:58:28 +02:00
|
|
|
thread_local = "1"
|