Created
November 21, 2016 20:06
-
-
Save anonymous/cb167f6f77b8783fdc8426ccf0f15481 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(()=>{ | |
let rgxEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{1,3})+$/; | |
let t1 = Date.now(); | |
let passTest = rgxEmail.test('abcdefghijklmnopqrstuvwxyza'); | |
let ms = Date.now() - t1; | |
alert(ms); | |
})() | |
// 132 ms stopping at 24 chars | |
// 245 ms when stopping at 25 chars | |
// 484 ms when at 26 chars | |
// 1046 ms when at 27 chars | |
// 35916 ms(!) at 28 chars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment