Skip to content

Commit

Permalink
docs: update benchmark table
Browse files Browse the repository at this point in the history
  • Loading branch information
Armin Becher authored and Armin Becher committed Jan 4, 2024
1 parent b262cdd commit 160f13a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ For example the pattern `ca?` will match `cat` or `car`. The pattern `https://*`

Compared to the [rust regex library](https://crates.io/crates/regex), wildmatch pattern compile much faster and match with about the same speed. Compared to [glob pattern](https://docs.rs/glob/0.3.0/glob/struct.Pattern.html) wildmtach is faster in both compile and match time:

| Benchmark | wildmatch | regex | glob
| ---- | ----:| ----: | ----: |
| compiling/text | 990 ns | 476,980 ns| 4,517 ns
| compiling/complex | 122 ns | 177,510 ns | 562 ns
| matching/text | 568 ns | 655 ns | 1,896 ns
| matching/complex | 664 ns | 575 ns | 4,208 ns
| Benchmark | wildmatch | regex | glob | regex_lite
| ---- | ------------: | ---------: | -------------: | ---------: |
| compiling/text | **340 ns** | 39,714 ns | 1,470 ns | 13,210 ns
| compiling/complex | 70 ns | 153,830 ns | 255,780 ns | **60 ns**
| matching/text | **367 ns** | 3,882 ns | 440 ns | 6,097 ns
| matching/complex | **376 ns** | 16,024 ns | 1,526 ns | 3,773 ns

The library only depends on the rust [`stdlib`](https://doc.rust-lang.org/std/).

Expand Down

0 comments on commit 160f13a

Please sign in to comment.