• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rust-lang / regex / 2074
93%

Build:
DEFAULT BRANCH: master
Ran 30 Mar 2019 12:41PM UTC
Jobs 1
Files 23
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2074

push

travis-ci-com

BurntSushi
exec: add Aho-Corasick optimization

Finally, if a regex is just `foo|bar|baz|...|quux`, we will now use plain
old Aho-Corasick. The reason why we weren't doing this before is because
Aho-Corasick didn't support proper leftmost-first match semantics. But
since aho-corasick 0.7, it does, so we can now use it as a drop-in
replacement.

This basically fixes a pretty bad performance bug in a really common case,
but it is otherwise really hacked. First of all, this only happens when a
regex is literally `foo|bar|...|baz`. Even something like
`foo|b(a)r|...|baz` will prevent this optimization from happening, which
is a little silly. Second of all, this optimization only kicks in after
we've compiled the full pattern, which adds quite a bit of overhead. Fixing
this isn't trivial, since we may need the compiled program to resolve
capturing groups. The way to do this is probably to specialize compilation
for certain types of expressions. Maybe.

Anyway, we hack this in for now, and punt on further improvements until
we can really re-think how this should all work.

3790 of 4357 relevant lines covered (86.99%)

0.87 hits per line

Jobs
ID Job ID Ran Files Coverage
4 2074.4 30 Mar 2019 12:41PM UTC 0
86.99
Travis Job 2074.4
Source Files on build 2074
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #2074
  • f8ebdbbf on github
  • Prev Build on master (#2073)
  • Next Build on master (#2077)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc