Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vectorscan add to rebar #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vim/coc-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"rust-analyzer.linkedProjects": [
"byob/runner/Cargo.toml",
"engines/hyperscan/Cargo.toml",
"engines/vectorscan/Cargo.toml",
"engines/icu/Cargo.toml",
"engines/pcre2/Cargo.toml",
"engines/re2/Cargo.toml",
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ members = [
exclude = [
"byob/runner",
"engines/hyperscan",
"engines/vectorscan",
"engines/icu",
"engines/pcre2",
"engines/re2",
Expand Down
5 changes: 5 additions & 0 deletions benchmarks/definitions/curated/01-literal.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -70,6 +71,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -98,6 +100,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -127,6 +130,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -158,6 +162,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down
5 changes: 5 additions & 0 deletions benchmarks/definitions/curated/02-literal-alternate.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -100,6 +101,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -128,6 +130,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -157,6 +160,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -188,6 +192,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down
4 changes: 4 additions & 0 deletions benchmarks/definitions/curated/03-date.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ count = [
{ engine = 'dotnet.*', count = 111_825 },
# Hyperscan reports all possible matches, so its total span count is higher.
{ engine = 'hyperscan', count = 547_662 },
{ engine = 'vectorscan', count = 547_662 },
# ICU doesn't provide a way to disable Unicode.
{ engine = 'icu', count = 111_825 },
# I don't know why the count span differs here. Note that this matches
Expand Down Expand Up @@ -85,6 +86,7 @@ engines = [
'dotnet/compiled',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -163,11 +165,13 @@ case-insensitive = true
haystack = "2010-03-14"
count = [
{ engine = 'hyperscan', count = 10 },
{ engine = 'vectorscan', count = 10 },
{ engine = '.*', count = 5 },
]
engines = [
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'pcre2',
'pcre2/jit',
Expand Down
6 changes: 6 additions & 0 deletions benchmarks/definitions/curated/06-cloud-flare-redos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ regex = '''(?:(?:"|'|\]|\}|\\|\d|(?:nan|infinity|true|false|null|undefined|symbo
haystack = 'math x=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
count = [
{ engine = 'hyperscan', count = 5757 },
{ engine = 'vectorscan', count = 5757 },
{ engine = '.*', count = 107 },
]
engines = [
Expand All @@ -75,6 +76,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand All @@ -97,6 +99,7 @@ regex = '.*.*=.*'
haystack = 'x=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
count = [
{ engine = 'hyperscan', count = 5252 },
{ engine = 'vectorscan', count = 5252 },
{ engine = '.*', count = 102 },
]
engines = [
Expand All @@ -105,6 +108,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand All @@ -127,6 +131,7 @@ regex = '.*.*=.*'
haystack = { path = "cloud-flare-redos.txt" }
count = [
{ engine = 'hyperscan', count = 50004999 },
{ engine = 'vectorscan', count = 50004999 },
{ engine = '.*', count = 10000 },
]
engines = [
Expand All @@ -135,6 +140,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/definitions/curated/08-words.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -124,6 +125,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down
2 changes: 2 additions & 0 deletions benchmarks/definitions/curated/09-aws-keys.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -123,6 +124,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'pcre2',
'pcre2/jit',
Expand Down
11 changes: 11 additions & 0 deletions benchmarks/definitions/curated/10-bounded-repeat.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ regex = '[A-Za-z]{8,13}'
haystack = { path = "opensubtitles/en-sampled.txt", line-end = 5_000 }
count = [
{ engine = 'hyperscan', count = 3724 },
{ engine = 'vectorscan', count = 3724 },
{ engine = '.*', count = 1833 },
]
engines = [
Expand All @@ -50,6 +51,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand All @@ -73,6 +75,7 @@ unicode = true
haystack = { path = "opensubtitles/ru-sampled.txt", line-end = 5_000 }
count = [
{ engine = 'hyperscan', count = 8570 },
{ engine = 'vectorscan', count = 8570 },
{ engine = '.*', count = 3475 },
]
engines = [
Expand All @@ -81,6 +84,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand All @@ -101,6 +105,7 @@ regex = '[A-Za-z]{10}\s+[\s\S]{0,100}Result[\s\S]{0,100}\s+[A-Za-z]{10}'
haystack = { path = "rust-src-tools-3b0d4813.txt" }
count = [
{ engine = 'hyperscan', count = 109 },
{ engine = 'vectorscan', count = 109 },
{ engine = '.*', count = 53 },
]
engines = [
Expand All @@ -109,6 +114,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand All @@ -131,6 +137,7 @@ regex = '(?:[A-Z][a-z]+\s*){10,100}'
haystack = { path = "rust-src-tools-3b0d4813.txt" }
count = [
{ engine = 'hyperscan', count = 237 },
{ engine = 'vectorscan', count = 237 },
{ engine = '.*', count = 11 },
]
engines = [
Expand All @@ -139,6 +146,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand All @@ -165,6 +173,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'pcre2',
'pcre2/jit',
Expand All @@ -186,13 +195,15 @@ regex = '(?:[A-Z][a-z]+\s*){10,100}'
haystack = 'Crazy Janey Mission Man Wild Billy Greasy Lake Hazy Davy Killer Joe'
count = [
{ engine = 'hyperscan', count = 12 },
{ engine = 'vectorscan', count = 12 },
{ engine = '.*', count = 1 },
]
engines = [
'dotnet/compiled',
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'pcre2',
'pcre2/jit',
Expand Down
6 changes: 6 additions & 0 deletions benchmarks/definitions/curated/12-dictionary.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ analysis = '''

`hyperscan` is omitted because the regex is too large.

`vectorscan` is omitted because the regex is too large.

`pcre2/*` are omitted because the regex is too large.
'''

Expand All @@ -139,6 +141,7 @@ haystack = { path = "opensubtitles/en-medium.txt" }
count = 1
engines = [
'hyperscan',
'vectorscan',
'rust/regex',
]
analysis = '''
Expand Down Expand Up @@ -173,6 +176,8 @@ analysis = '''

`hyperscan` is omitted because the regex is too large.

`vectorscan` is omitted because the regex is too large.

`java/hotspot` is omitted because we currently don't benchmark Perl regex
compilation.

Expand All @@ -192,6 +197,7 @@ haystack = "Zubeneschamali's"
count = 1
engines = [
'hyperscan',
'vectorscan',
'rust/regex',
]
analysis = '''
Expand Down
6 changes: 6 additions & 0 deletions benchmarks/definitions/curated/13-noseyparker.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ regex = { path = "wild/noseyparker.txt", per-line = "alternate" }
haystack = { path = 'wild/cpython-226484e4.py', utf8-lossy = true }
count = [
{ engine = 'hyperscan', count = 241 },
{ engine = 'vectorscan', count = 241 },
{ engine = '.*', count = 55 },
]
engines = [
'hyperscan',
'vectorscan',
'pcre2/jit',
'rust/regex',
'rust/regexold',
Expand Down Expand Up @@ -88,10 +90,12 @@ regex = { path = "wild/noseyparker.txt", per-line = "pattern" }
haystack = { path = 'wild/cpython-226484e4.py', utf8-lossy = true }
count = [
{ engine = 'hyperscan', count = 241 },
{ engine = 'vectorscan', count = 241 },
{ engine = '.*', count = 55 },
]
engines = [
'hyperscan',
'vectorscan',
'rust/regex',
]
analysis = '''
Expand All @@ -109,6 +113,7 @@ haystack = "TWITTER_API_KEY = 'UZYoBAfBzNace3mBwPOGYw'"
count = 1
engines = [
'hyperscan',
'Vectorscan',
'pcre2/jit',
'rust/regex',
'rust/regexold',
Expand All @@ -125,6 +130,7 @@ haystack = "TWITTER_API_KEY = 'UZYoBAfBzNace3mBwPOGYw'"
count = 1
engines = [
'hyperscan',
'vectorscan',
'rust/regex',
]
analysis = '''
Expand Down
3 changes: 3 additions & 0 deletions benchmarks/definitions/curated/14-quadratic.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -122,6 +123,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down Expand Up @@ -158,6 +160,7 @@ engines = [
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'vectorscan',
'icu',
'java/hotspot',
'javascript/v8',
Expand Down
Loading