On Jun 11, 2005, at 6:24 PM, Richard Lynch wrote:
Have you actually tried it yet, either way?
Cuz I suspect you are worrying over a lot of nothing...
I did post the results a couple of days ago. Switching to a function
made an enormous difference. It went from an average of 45 seconds to
a
On Thu, June 9, 2005 10:06 am, Brian Dunning said:
>
> On Jun 9, 2005, at 9:48 AM, bruce wrote:
>
>> bian...
>>
>> giave a psuedocode example of what you're trying to compare.. i
>> think i know
>> what you're asking, but i want to be sure..
>
> OK, this is *pseudocode* remember... :)
>
> Is eithe
bruce wrote:
in all honesty, it would really depend on how good the compiler/optimizer
is.
No, it doesn't. Path resolution must still be performed, and this is
going to result in at least one stat() and one realpath() call. These
are expensive.
Chris
--
Chris Shiflett
Brain Bulb, The PHP C
--Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 09, 2005 10:34 AM
To: Brian Dunning
Cc: php-general@lists.php.net
Subject: Re: [PHP] Is there a big speed difference...
Brian Dunning wrote:
> I have an include file with about 6 lines of code, just text pa
Brian Dunning wrote:
I have an include file with about 6 lines of code, just text parsing.
If I have to loop through 5000 records, is there a big difference
between (a) calling this include file 5000 times, and (b) defining a
function and just calling the function 5000 times?
Yes, there is a bi
Brent Baisley wrote:
Not sure which is faster, you would have to run a quick test to truly
see. From a design standpoint, I would put the function in a class and
load the class early in the file. You can then override the function,
make changes to the number of parameters or other "flexibility"
On Jun 9, 2005, at 10:54 AM, Jochem Maas wrote:
unless you intend to make a call
to your function from inside the include file,
No, the question is which of the two to use, not both. :)
I've built a version that uses a function, will test, and will post
the results.
--
PHP General Mailin
Brian Dunning wrote:
On Jun 9, 2005, at 9:44 AM, Jochem Maas wrote:
or (c) just placing the code inside the loop - no function call , no
include,
just wash and go ;-) - whichever is faster of (a) and (b), my (c)
will be faster still. :-)
I agree (c) would be swell but this is a function t
Not sure which is faster, you would have to run a quick test to truly
see. From a design standpoint, I would put the function in a class and
load the class early in the file. You can then override the function,
make changes to the number of parameters or other "flexibility"
actions. The functio
On Jun 9, 2005, at 9:44 AM, Jochem Maas wrote:
or (c) just placing the code inside the loop - no function call ,
no include,
just wash and go ;-) - whichever is faster of (a) and (b), my (c)
will be faster still. :-)
I agree (c) would be swell but this is a function that I call from
many
On Jun 9, 2005, at 9:48 AM, bruce wrote:
bian...
giave a psuedocode example of what you're trying to compare.. i
think i know
what you're asking, but i want to be sure..
OK, this is *pseudocode* remember... :)
Is either of these SIGNIFICANTLY slower:
=== Example 1 ===
while(loops 5000
Brian Dunning wrote:
I have an include file with about 6 lines of code, just text parsing.
If I have to loop through 5000 records, is there a big difference
between (a) calling this include file 5000 times, and (b) defining a
function and just calling the function 5000 times?
or (c) just p
12 matches
Mail list logo