{"push_id":697294824,"size":2,"distinct_size":1,"ref":"refs/heads/master","head":"f09a2875bfeeee8b4befa1a9e6d541500377096d","before":"a1106f8dee2a6b55c44e6a7a7e7934fa2e51728f","commits":[{"sha":"c86c02562457bb0cf3b149fd3d85cefb50b55eac","author":{"email":"816d9d5b550360e0a4a4b626f349db7b98a5ef6b@gmail.com","name":"Andrew Gallant"},"message":"Major refactoring and performance improvements.\n\nOverview of changes:\n\n* Instruction set has been redesigned to be smaller, mostly by\n  collapsing empty-width matches into one instruction type.\n  In addition to moving instruction-matching out of the matching\n  engine, this makes matching engine code much simpler.\n* Rewrote input handling to use an inline representation of\n  `Option<char>` and clearer position handling with the `Input` trait.\n* Added a new bounded backtracking matching engine that is invoked for\n  small regexes/inputs. It's about twice as fast as the full NFA\n  matching engine.\n* Implemented caching for both the NFA and backtracking engines.\n  This avoids costly allocations on subsequent uses of the regex.\n* Overhauled prefix handling at both discovery and matching.\n  Namely, sets of prefix literals can now be extracted from regexes.\n  Depending on what the prefixes look like, an Aho-Corasick DFA\n  is built from them.\n  (This adds a dependency on the `aho-corasick` crate.)\n* When appropriate, use `memchr` to jump around in the input when\n  there is a single common byte prefix.\n  (This adds a dependency on the `memchr` crate.)\n* Bring the `regex!` macro up to date. Unfortunately, it still\n  implements the full NFA matching engine and doesn't yet have\n  access to the new prefix DFA handling. Thus, its performance\n  has gotten *worse* than the dynamic implementation in most\n  cases. The docs have been updated to reflect this change.\n\nSurprisingly, all of this required exactly one new application of\n`unsafe`, which is isolated in the `memchr` crate. (Aho-Corasick has no\n`unsafe` either!)\n\nThere should be *no* breaking changes in this commit. The only public\nfacing change is the addition of a method to the `Replacer` trait, but\nit comes with a default implementation so that existing implementors\nwon't break. (Its purpose is to serve as a hint as to whether or not\nreplacement strings need to be expanded. This is crucial to speeding\nup simple replacements.)\n\nCloses #21.","distinct":false,"url":"https://api.github.com/repos/rust-lang/regex/commits/c86c02562457bb0cf3b149fd3d85cefb50b55eac"},{"sha":"f09a2875bfeeee8b4befa1a9e6d541500377096d","author":{"email":"816d9d5b550360e0a4a4b626f349db7b98a5ef6b@gmail.com","name":"Andrew Gallant"},"message":"Merge pull request #91 from rust-lang/nfa-compile-refactor\n\nMajor refactoring and performance improvements.","distinct":true,"url":"https://api.github.com/repos/rust-lang/regex/commits/f09a2875bfeeee8b4befa1a9e6d541500377096d"}]}