-
Notifications
You must be signed in to change notification settings - Fork 424
Comparing changes
Open a pull request
base repository: rust-lang/regex
base: 1.4.3
head repository: rust-lang/regex
compare: 1.4.5
- 12 commits
- 26 files changed
- 4 contributors
Commits on Jan 12, 2021
-
api: Replacer for more string types
And do the same for the bytes oriented APIs. This results in some small quality of life improvements when using the Replacer trait with a string type that isn't &str. PR #728
Configuration menu - View commit details
-
Copy full SHA for 2bab987 - Browse repository at this point
Copy the full SHA 2bab987View commit details -
Configuration menu - View commit details
-
Copy full SHA for 259863d - Browse repository at this point
Copy the full SHA 259863dView commit details
Commits on Jan 21, 2021
-
doc: use 'text' instead of 'ignore' for regexes
This makes rendering a bit nicer by disabling syntax highlighting and removing the "untested" warning. PR #741
Configuration menu - View commit details
-
Copy full SHA for bf7f8f1 - Browse repository at this point
Copy the full SHA bf7f8f1View commit details
Commits on Mar 12, 2021
-
deps: update quickcheck and rand
The quickcheck update seems to have sussed out a bug in our DFA logic regarding the encoding of NFA state IDs. But the bug seems unlikely to occur in real code, so we massage the test data for now until the lazy DFA gets moved into regex-automata.
Configuration menu - View commit details
-
Copy full SHA for f858ff3 - Browse repository at this point
Copy the full SHA f858ff3View commit details -
bench: reduce huge regex a bit
It looks like it blows the default regex size limit at the moment.
Configuration menu - View commit details
-
Copy full SHA for 691ec58 - Browse repository at this point
Copy the full SHA 691ec58View commit details -
doc: refine use of the word 'unsafe'
This removes extraneous commentary that uses the word 'unsafe'. This makes it easier to grep for usages of meaningful 'unsafe' in the code.
Configuration menu - View commit details
-
Copy full SHA for 5107293 - Browse repository at this point
Copy the full SHA 5107293View commit details -
impl: drop thread_local dependency
This commit removes the thread_local dependency (even as an optional dependency) and replaces it with a more purpose driven memory pool. The comments in src/pool.rs explain this in more detail, but the short story is that thread_local seems to be at the root of some memory leaks happening in certain usage scenarios. The great thing about thread_local though is how fast it is. Using a simple Mutex<Vec<T>> is easily at least twice as slow. We work around that a bit by coding a simplistic fast path for the "owner" of a pool. This does require one new use of `unsafe`, of which we extensively document. This now makes the 'perf-cache' feature a no-op. We of course retain it for compatibility purposes (and perhaps it will be used again in the future), but for now, we always use the same pool. As for benchmarks, it is likely that *some* cases will get a hair slower. But there shouldn't be any dramatic difference. A careful review of micro-benchmarks in addition to more holistic (albeit ad hoc) benchmarks via ripgrep seems to confirm this. Now that we have more explicit control over the memory pool, we also clean stuff up with repsect to RefUnwindSafe. Fixes #362, Fixes #576 Ref BurntSushi/rure-go#3
Configuration menu - View commit details
-
Copy full SHA for e040c1b - Browse repository at this point
Copy the full SHA e040c1bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 967a090 - Browse repository at this point
Copy the full SHA 967a090View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a35701 - Browse repository at this point
Copy the full SHA 5a35701View commit details -
Configuration menu - View commit details
-
Copy full SHA for 951b8b9 - Browse repository at this point
Copy the full SHA 951b8b9View commit details
Commits on Mar 14, 2021
-
impl: substantially reduce regex stack size
This commit fixes a fairly large regression in the stack size of a Regex introduced in regex 1.4.4. When I dropped thread_local and replaced it with Pool, it turned out that Pool inlined a T into its struct and a Regex in turn had Pool inlined into itself. It further turns out that the T=ProgramCache is itself quite large. We fix this by introducing an indirection in the inner regex type. That is, we use a Box<Pool> instead of a Pool. This shrinks the size of a Regex from 856 bytes to 16 bytes. Interestingly, prior to regex 1.4.4, a Regex was still quite substantial in size, coming in at around 552 bytes. So it looks like the 1.4.4 release didn't dramatically increase it, but it increased it enough that folks started experiencing real problems: stack overflows. Since indirection can lead to worse locality and performance loss, I did run the benchmark suite. I couldn't see any measurable difference. This is generally what I would expect. This is an indirection at a fairly high level. There's lots of other indirection already, and this indirection isn't accessed in a hot path. (The regex cache itself is of course used in hot paths, but by the time we get there, we have already followed this particular pointer.) We also include a regression test that asserts a Regex (and company) are 16 bytes in size. While this isn't an API guarantee, it at least means that increasing the size of Regex will be an intentional thing in the future and not an accidental leakage of implementation details. Fixes #750, Fixes #751 Ref servo/servo#28269
Configuration menu - View commit details
-
Copy full SHA for 78c7cef - Browse repository at this point
Copy the full SHA 78c7cefView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff283ba - Browse repository at this point
Copy the full SHA ff283baView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 1.4.3...1.4.5