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

`|@a` is apparently-equivalent to just `@a` but is 70x slower #6238

Closed
p6rt opened this issue May 12, 2017 · 4 comments
Closed

`|@a` is apparently-equivalent to just `@a` but is 70x slower #6238

p6rt opened this issue May 12, 2017 · 4 comments
Labels

Comments

@p6rt
Copy link

@p6rt p6rt commented May 12, 2017

Migrated from rt.perl.org#131297 (status was 'resolved')

Searchable as RT131297$

@p6rt
Copy link
Author

@p6rt p6rt commented May 12, 2017

From @zoffixznet

https://irclog.perlgeek.de/perl6-dev/2017-05-12#i_14572067

14​:49 m​: my @​a = 1..12; for ('a' x 100 ~ " -- Jan-12-2017") xx 100 { when /'-- ' |@​a '-' \d**2 '-' \d**4 / { } }; say now - INIT now
14​:49 camelia rakudo-moar 94c4e7​: OUTPUT​: «4.269762␤»
14​:49 Zoffix m​: my @​a = 1..12; for ('a' x 100 ~ " -- Jan-12-2017") xx 100 { when /'-- ' ||@​a '-' \d**2 '-' \d**4 / { } }; say now - INIT now
14​:49 camelia rakudo-moar 94c4e7​: OUTPUT​: «0.3336069␤»
14​:49 Zoffix m​: my @​a = 1..12; for ('a' x 100 ~ " -- Jan-12-2017") xx 100 { when /'-- ' @​a '-' \d**2 '-' \d**4 / { } }; say now - INIT now
14​:49 camelia rakudo-moar 94c4e7​: OUTPUT​: «0.0607072␤»
14​:49 Zoffix m​: say 4.269762/0.0607072
14​:49 camelia rakudo-moar 94c4e7​: OUTPUT​: «70.3337001␤»
14​:49 Zoffix apparently-equivalent but 70x slower
14​:50 timotimo well well, we still have a lot of opportunities to improve these things

@p6rt
Copy link
Author

@p6rt p6rt commented Feb 19, 2019

From @AlexDaniel

Closing, explanation here​: rakudo/rakudo#2708

On 2017-05-12 07​:52​:34, cpan@​zoffix.com wrote​:

https://irclog.perlgeek.de/perl6-dev/2017-05-12#i_14572067

14​:49 m​: my @​a = 1..12; for ('a' x 100 ~ " -- Jan-12-2017")
xx 100 { when /'-- ' |@​a '-' \d**2 '-' \d**4 / { } }; say now - INIT
now
14​:49 camelia rakudo-moar 94c4e7​: OUTPUT​: «4.269762␤»
14​:49 Zoffix m​: my @​a = 1..12; for ('a' x 100 ~ " -- Jan-12-2017")
xx 100 { when /'-- ' ||@​a '-' \d**2 '-' \d**4 / { } }; say now - INIT
now
14​:49 camelia rakudo-moar 94c4e7​: OUTPUT​: «0.3336069␤»
14​:49 Zoffix m​: my @​a = 1..12; for ('a' x 100 ~ " -- Jan-12-2017")
xx 100 { when /'-- ' @​a '-' \d**2 '-' \d**4 / { } }; say now - INIT
now
14​:49 camelia rakudo-moar 94c4e7​: OUTPUT​: «0.0607072␤»
14​:49 Zoffix m​: say 4.269762/0.0607072
14​:49 camelia rakudo-moar 94c4e7​: OUTPUT​: «70.3337001␤»
14​:49 Zoffix apparently-equivalent but 70x slower
14​:50 timotimo well well, we still have a lot of
opportunities to improve these things

@p6rt
Copy link
Author

@p6rt p6rt commented Feb 19, 2019

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

@p6rt p6rt commented Feb 19, 2019

@AlexDaniel - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this Feb 19, 2019
@p6rt p6rt added perf regex labels Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.