in reply to Re: Why is "for" much slower than "while"?
in thread Why is "for" much slower than "while"?
Try
whyfor2 => sub { seek( $IN1, 0, 0 ); my %counts = (); ++$counts{$_} for ( ; defined( $_ = <$IN1> ) ; ) ; die unless keys %counts == @list; },
|
---|
In Section
Seekers of Perl Wisdom