in reply to Why it takes so much time here?
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);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why it takes so much time here?
by PerlOnTheWay (Monk) on Dec 28, 2011 at 04:11 UTC | |
by BrowserUk (Patriarch) on Dec 28, 2011 at 04:14 UTC |