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

C# Benchmark with RegexOptions.ECMAScript #7

Closed
khaale opened this issue Mar 2, 2018 · 1 comment
Closed

C# Benchmark with RegexOptions.ECMAScript #7

khaale opened this issue Mar 2, 2018 · 1 comment

Comments

@khaale
Copy link

khaale commented Mar 2, 2018

It might be worth using RegexOptions.ECMAScript in C# benchmark, or just add another bench for c# with this option. It drops some 'advanced' features like Unicode support, which increases performance in ~1.5-2 times.

I understand that it's a questionable decision, and I could mention some pros and cons here:

  • We are competing with different regex engines, and some of them, like JS one, as far as I'm aware, does not support UTF. So it's a bit unfair to compare motorbike with a truck.
  • It looks like we compare default regex usage patterns, and I have never seen anyone use RegexOptions.ECMAScript in a real life.

My results (Windows 10, dotnet core 2.1.4):

Original

1824.7035 - 92
1560.8753 - 5301
109.0058 - 5

With ECMAScript

1072.2842 - 92
908.0764 - 5301
110.9607 - 5
@mariomka
Copy link
Owner

Finally, I have configured as ECMAScript for C# implementation.

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

No branches or pull requests

2 participants