Re: stupid optimization question

2007-05-17 Thread Jonathan Vanasco
On May 17, 2007, at 12:59 PM, Perrin Harkins wrote: I think you've found the dumbest and tiniest here. I'd suggest looking anywhere else. There's probably something in your database config that could be tweaked to make more difference than this. i'm pretty sure I have too. database has been

Re: catching a segmentation fault

2007-05-17 Thread Tyler Bird
Torsten Foertsch wrote: On Thursday 17 May 2007 00:13, Tyler Bird wrote: I am setting up a new server with mod_perl + apache 2.0 + some legacy code and am sporadically rececing a segmentation fault to my apache logs like so. Maybe this helps: http://perl.apache.org/docs/2.0/devel/debug

Re: stupid optimization question

2007-05-17 Thread Perrin Harkins
On 5/17/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: I'm refactoring a certain bottleneck, and looking for the dumbest tiniest improvements I can make in this one package. I think you've found the dumbest and tiniest here. I'd suggest looking anywhere else. There's probably something in yo

Re: stupid optimization question

2007-05-17 Thread Jonathan Vanasco
On May 17, 2007, at 11:53 AM, Michael Peters wrote: I would imagine the 2nd to be marginally faster. Perl doesn't have to re-allocate memory for the array each time the sub is called, but it does have to re-initialize it. As long as the array's contents are constant I'd go with the 2nd exam

Re: stupid optimization question

2007-05-17 Thread Michael Peters
Jonathan Vanasco wrote: > > I apologize for the stupidity of this in advance-- its just something > that I thought of in relation to mod_perl after starting a discussion on > perlmonks about use constant vs sub(){} ... > > > does anyone know if there is a memory/other difference under mod_perl f

Re: stupid optimization question

2007-05-17 Thread Perrin Harkins
On 5/17/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: does anyone know if there is a memory/other difference under mod_perl for sub a { my @items= qw| 1 2 3 |; foreach my $a ( @items ) {} } vs my @_b_items= qw| 1 2 3 |;

stupid optimization question

2007-05-17 Thread Jonathan Vanasco
I apologize for the stupidity of this in advance-- its just something that I thought of in relation to mod_perl after starting a discussion on perlmonks about use constant vs sub(){} ... does anyone know if there is a memory/other difference under mod_perl for sub a {

Re: catching a segmentation fault

2007-05-17 Thread Torsten Foertsch
On Thursday 17 May 2007 00:13, Tyler Bird wrote: > I am setting up a new server with mod_perl + apache 2.0 + some legacy code > and am sporadically rececing a segmentation fault to my apache logs like > so. Maybe this helps: http://perl.apache.org/docs/2.0/devel/debug/c.html Is your code by chanc