[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Benchmarking $|++



On Mon, Nov 08, 1999 at 03:41:57PM -0600, Tushar Samant wrote:
> On Mon, 8 Nov 1999, Peter Scott wrote:
> >[...] saying that someone else who had written
> >
> >         $|++;
> >
> >should have written it as
> >
> >         $| = 1;
> >
> >since it executes faster (and produced Benchmark data to prove it).
> >
> >Think about it.
> 
> Well I did, and my head hurts a bit, but I think I know what it means.
> In fact I benchmarked them right now and it's true. On my machine the
> latter is almost 8 microseconds faster. I will be properly grateful as
> soon as I stop laughing. Peace

More importantly, what if some smart-ass library author decided to
write $| = -1;

-- 

Michael G Schwern                                           schwern@pobox.com
                    http://www.pobox.com/~schwern
     /(?:(?:(1)[.-]?)?\(?(\d{3})\)?[.-]?)?(\d{3})[.-]?(\d{4})(x\d+)?/i

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe