Skip to content

Commit 488fe56

Browse files
davisjamBurntSushi
authored andcommitted
doc: remove incorrect use of "unbounded"
The potential for memory growth without state cleaning is not unbounded, but rather proportional to the length of the input string. Also: "blow up" to "blow-up" for consistency. PR #519
1 parent cd6f1e2 commit 488fe56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -504,10 +504,10 @@ text`), which means there's no way to cause exponential blow-up like with
504504
some other regular expression engines. (We pay for this by disallowing
505505
features like arbitrary look-ahead and backreferences.)
506506
507-
When a DFA is used, pathological cases with exponential state blow up are
507+
When a DFA is used, pathological cases with exponential state blow-up are
508508
avoided by constructing the DFA lazily or in an "online" manner. Therefore,
509509
at most one new state can be created for each byte of input. This satisfies
510-
our time complexity guarantees, but can lead to unbounded memory growth
510+
our time complexity guarantees, but can lead to memory growth
511511
proportional to the size of the input. As a stopgap, the DFA is only
512512
allowed to store a fixed number of states. When the limit is reached, its
513513
states are wiped and continues on, possibly duplicating previous work. If

0 commit comments

Comments
 (0)