Re: OT Perl Optimizations Was: undef & NULL

2001-09-15 Thread Bart Lateur
On Fri, 14 Sep 2001 12:05:05 +0200, Peter J . Holzer wrote: >I don't trust the Benchmark module, though. It reported one negative >"wallclock secs" value at every run, and the wallclock and usr times >differ too much for a test which should essentially take 100% user time. Are you saying you wan

Re: OT Perl Optimizations Was: undef & NULL

2001-09-14 Thread James D. White
I modified Peter J. Holzer's code to test both the case where the $i is set to 1 (Holzer's case) and where $i is 0 (which forces more assignments). I also added a straight assignment statement to each set. The program and results are below. This test was run three times on a Sun Ultra 5, with So

Re: OT Perl Optimizations Was: undef & NULL

2001-09-14 Thread Peter J . Holzer
On 2001-09-13 17:01:20 -0400, Rob Ransbottom wrote: > On Thu, 13 Sep 2001 [EMAIL PROTECTED] wrote: > > > I have a minor optimization suggestion. Instead of this: > > > unless ($sth_routine_name) { > > #setup statement handle > > } > > > Do this: > > > > $sth_routine_name ||= $dbh->prepare

Re: OT Perl Optimizations Was: undef & NULL

2001-09-13 Thread Rob Ransbottom
On Thu, 13 Sep 2001, Tim Bunce wrote: > On Thu, Sep 13, 2001 at 05:01:20PM -0400, Rob Ransbottom wrote: > > Talk about infinitesimal differences. > > Exactly. I'd rather spend my time on the bigger performance issues > and then, if there's any time left over, go and have a beer... I agree in th

Re: OT Perl Optimizations Was: undef & NULL

2001-09-13 Thread Tim Bunce
On Thu, Sep 13, 2001 at 05:01:20PM -0400, Rob Ransbottom wrote: > Talk about infinitesimal differences. Exactly. I'd rather spend my time on the bigger performance issues and then, if there's any time left over, go and have a beer... Tim.

OT Perl Optimizations Was: undef & NULL

2001-09-13 Thread Rob Ransbottom
On Thu, 13 Sep 2001 [EMAIL PROTECTED] wrote: > I have a minor optimization suggestion. Instead of this: > unless ($sth_routine_name) { > #setup statement handle > } > Do this: > > $sth_routine_name ||= $dbh->prepare(); > pretty sure this is more efficient than setting up the unless b