Commit cf7b871
[ruby/uri] Improve performance of
Fix the performance regression at #172 for valid emails.
``` yml
prelude: |
require 'uri/mailto'
n = 1000
re = URI::MailTo::EMAIL_REGEXP
benchmark:
n.t..t.: re.match?("[email protected]")
example: re.match?("[email protected]")
```
| |released| 788274b| c5974f0| this|
|:--------|-------:|-------:|-------:|-------:|
|n.t..t. | 3.795M| 4.864M| 4.993M| 8.739M|
| | -| 1.28x| 1.32x| 2.30x|
|example | 3.911M| 3.740M| 2.838M| 3.880M|
| | 1.38x| 1.32x| -| 1.37x|
ruby/uri@7363a134acURI::MailTo::EMAIL_REGEXP
1 parent 22b81b5 commit cf7b871
2 files changed
+21
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
213 | 229 | | |
214 | 230 | | |
215 | 231 | | |
| |||
0 commit comments