Skip to content

Conversation

@nobu
Copy link
Member

@nobu nobu commented Jul 12, 2025

Fix the performance regression at #172 for valid emails.

prelude: |
  require 'uri/mailto'
  n = 1000
  re = URI::MailTo::EMAIL_REGEXP
benchmark:
  n.t..t.: re.match?("n.t..t.@docomo.ne.jp")
  example: re.match?("example@example.info")
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

@nobu nobu force-pushed the email_regexp-refine branch from 684865b to e1a286a Compare July 12, 2025 10:29
Fix the performance regression at ruby#172 for valid emails.

``` yml
prelude: |
  require 'uri/mailto'
  n = 1000
  re = URI::MailTo::EMAIL_REGEXP
benchmark:
  n.t..t.: re.match?("n.t..t.@docomo.ne.jp")
  example: re.match?("example@example.info")
```

|         |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|
@nobu nobu force-pushed the email_regexp-refine branch from e1a286a to 7363a13 Compare July 12, 2025 10:31
@nobu nobu merged commit 5aab1e6 into ruby:master Jul 12, 2025
@nobu nobu deleted the email_regexp-refine branch July 12, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant