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

Closures in regex cost a lot of CPU cycles. #4503

Open
p6rt opened this issue Sep 3, 2015 · 1 comment
Open

Closures in regex cost a lot of CPU cycles. #4503

p6rt opened this issue Sep 3, 2015 · 1 comment
Labels

Comments

@p6rt
Copy link

@p6rt p6rt commented Sep 3, 2015

Migrated from rt.perl.org#125974 (status was 'new')

Searchable as RT125974$

@p6rt

This comment has been minimized.

Copy link
Author

@p6rt p6rt commented Sep 3, 2015

From perl6@6dof.xyz

How to reproduce​:

  time perl6 -e "say 'abcdef' ~~ /<{('a' ... 'z').list}>+/"
  「abcdef」

Current result​:

  real 0m4.455s
  user 0m4.203s
  sys 0m0.252s

Expected result -- same as with​:

  time perl6 -e "say 'abcdef' ~~ /​:my @​l = ('a' ... 'z').list; @​l+/"
  「abcdef」

  real 0m0.382s
  user 0m0.289s
  sys 0m0.093s

Note​: this is not a bug, I just wonder if it's a LHF.

Note 2​: As of my understanding, the issue is not due to the +
  repeater.

@p6rt p6rt added the perf label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.