On Tue, 8 Aug 2000 11:25:56 -0500, Jonathan Scott Duff wrote:
>Someone proposed (I think I deleted that email) to make
>
> while (<FH>) { ... }
>
>work like
>
> while (<FH>) { chomp; ... }
Guilty.
I've benchmarked the above codes, with '...' replaced by nothing, chomp
vs. the -l command line switch, and it turns out that the implicit chomp
of -l is almost 10% faster than the explicit chomp() of the traditional
approach: 9.83 seconds (implicit) vs. 10.77 seconds (explicit), on the
same file.
The culprit is that $/ set to something other than "" (or undef) slows
down the printing considerably: abnout 20%. This probably could be
improved by a lot.
--
Bart.
- Re: Things to remove Damian Conway
- Re: Things to remove Larry Wall
- Re: Things to remove Bart Lateur
- Re: Things to remove Tom Christiansen
- Re: Things to remove Ed Mills
- Re: Things to remove Simply Hao
- Re: Things to remove Jonathan Scott Duff
- Re: Things to remove Jonathan Scott Duff
- Re: Things to remove Ted Ashton
- Re: Things to remove Jonathan Scott Duff
- Re: Things to remove Bart Lateur
- Re: Things to remove Riad Wahby
- Re: Things to remove Bryan C . Warnock
- Re: Things to remove Casey R. Tweten
- Re: Things to remove Bryan C . Warnock
- RE: Things to remove Brust, Corwin
- Re: Things to remove Ed Mills
- Re: Things to remove Damian Conway
- RE: Things to remove Garrett Goebel
- Re: Things to remove Tom Christiansen
- RE: Things to remove Damian Conway
