RE: [PHP] performance issues

2008-04-18 Thread Ford, Mike
On 17 April 2008 11:57, Bojan Tesanovic advised: in PHP5 by default Objects are passed by reference Please stop repeating this -- erm -- inexactitude. In PHP5, objects are passed around by their handle, *not* as a reference. Most of the time, this has the same effect, as you are addressing the

Re: [PHP] performance issues

2008-04-17 Thread Robert Cummings
On Wed, 2008-04-16 at 23:37 -0400, Nathan Nobbe wrote: all, i have heard from various sources that using the in php can at times be costly, and therefore, it should not be used when it is not needed. for example, passing an array by reference because you think youre passing the actual

Re: [PHP] performance issues

2008-04-17 Thread Bojan Tesanovic
On Apr 17, 2008, at 5:37 AM, Nathan Nobbe wrote: all, i have heard from various sources that using the in php can at times be costly, and therefore, it should not be used when it is not needed. for example, passing an array by reference because you think youre passing the actual array

Re: [PHP] performance issues

2008-04-17 Thread Nathan Nobbe
On Thu, Apr 17, 2008 at 12:14 AM, Robert Cummings [EMAIL PROTECTED] wrote: If it's faster, it's faster so that would suggest a performance gain... but as many will tell you, and you most likely already know... is the gain worth the effort? BTW, rote replacement of references like that, may

Re: [PHP] performance issues

2008-04-17 Thread Nathan Nobbe
On Thu, Apr 17, 2008 at 4:57 AM, Bojan Tesanovic [EMAIL PROTECTED] wrote: in PHP5 by default Objects are passed by reference and as you can see at this graph passing array by reference in PHP5 is slower http://nathan.moxune.com/arrayVsArrayIteratorReport.php wow, thats hilarious, thats my

Re: [PHP] performance issues

2008-04-17 Thread Eric Butera
On Thu, Apr 17, 2008 at 12:00 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Thu, Apr 17, 2008 at 4:57 AM, Bojan Tesanovic [EMAIL PROTECTED] wrote: in PHP5 by default Objects are passed by reference and as you can see at this graph passing array by reference in PHP5 is slower

Re: [PHP] performance issues

2008-04-17 Thread Nathan Nobbe
On Thu, Apr 17, 2008 at 11:51 AM, Eric Butera [EMAIL PROTECTED] wrote: On Thu, Apr 17, 2008 at 12:00 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Thu, Apr 17, 2008 at 4:57 AM, Bojan Tesanovic [EMAIL PROTECTED] wrote: in PHP5 by default Objects are passed by reference and as you can

Re: [PHP] performance issues

2008-04-17 Thread Eric Butera
On Thu, Apr 17, 2008 at 7:10 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Thu, Apr 17, 2008 at 11:51 AM, Eric Butera [EMAIL PROTECTED] wrote: On Thu, Apr 17, 2008 at 12:00 PM, Nathan Nobbe [EMAIL PROTECTED] wrote: On Thu, Apr 17, 2008 at 4:57 AM, Bojan Tesanovic [EMAIL PROTECTED]

RE: [PHP] Performance issues and trees

2004-07-20 Thread Michael Sims
Sven Riedel wrote: letters 0 and 1. My tree-traversal algorithm looks like this: $bit_array = str_split( $bitstring ); $tree_climber = $tree; // assign tree-climber to the tree root // main loop while( !is_null( $bit = array_shift( $bit_array ) ) ) { $tree_climber =

Re: [PHP] Performance issues and trees

2004-07-20 Thread Sven Riedel
On Tue, Jul 20, 2004 at 09:49:07AM -0500, Michael Sims wrote: above is necessary. If you merely need to traverse $bit_array without actually modifying it then I suspect a simple foreach would be much faster, but I'm probably missing something... Ah, I just changed that and now it's a

Re: [PHP] Performance issues

2002-12-12 Thread KaReL
1megabyte of code :) not 1M lines sorry about that confusion there and the problem began slow, not noticable... But it's now worse then ever. Jon Haworth [EMAIL PROTECTED] wrote in message

RE: [PHP] Performance issues

2002-12-12 Thread Jon Haworth
Hi Karel, mysql entries: at least 2M php code: at least 1M lines More than a million lines of code? That's a *big* app. 1megabyte of code :) not 1M lines Aha :-) and the problem began slow, not noticable... But it's now worse then ever. Are you doing something that degrades,