Skip Menu |
Report information
Id: 131297
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: cpan [at] zoffix.com
Cc:
AdminCc:

Severity: (no value)
Tag: regex
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [PERF][REGEX] `|@a` is apparently-equivalent to just `@a` but is 70x slower
Download (untitled) / with headers
text/plain 907b
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


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org