Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile subject: *Regex* #120

Open
cullin-lam-simplisafe opened this issue Oct 3, 2022 · 1 comment
Open

Profile subject: *Regex* #120

cullin-lam-simplisafe opened this issue Oct 3, 2022 · 1 comment

Comments

@cullin-lam-simplisafe
Copy link

Profile subject: Regex

Rationale

I'd like to compare the performance between different regex operations.
For example I'd like to compare the speed of the following functions

  • String.search(regex)
    -String.match(regex)
  • Regex.test(string)
    -Regex.exec(string)

Profiled functionality

  • String.search(regex)
    -String.match(regex)
  • Regex.test(string)
    -Regex.exec(string)

We can profile performance as the length of the string to search increases
We can also profile different regular expressions that uses different features such as look behind and look ahead

@haensl
Copy link
Owner

haensl commented Oct 3, 2022

Hi,

I think comparing different Regex operations is a great enhancement!

Feel free to create a profile and submit a PR for it.

If you don't feel like coding the profiling it'll have to wait a bit since I'm quite occupied at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants