You can avoid half of the time with your original code by skipping the clean-up using POSIX_exit():
#! perl -slw use strict; use time::HiRes qw[ time ]; use POSIX qw[ _exit ]; use List::MoreUtils qw/any/; print time; my @a = any {$_== 92} 1..100000000; print time; print @a; print time; _exit(0);
In reply to Re: Why it takes so much time here?
by BrowserUk
in thread Why it takes so much time here?
by PerlOnTheWay
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |