Re: Include file

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

 



xfedex wrote:
<snip all my stuff>
Here is my test in a PIII 550Mhz 128mb with gentoo:

for ($i = 0; $i <= 9999; $i++) {
      $include = 'db_connect.php';
      include('include/'.$include);
}

3.623316 seconds
--------------------------------------

for ($i = 0; $i <= 9999; $i++) {
    $include = "db_connect.php";
    include("include/$include");
}

3.696468 seconds

meatbread.


So basically, I run the test 20 times, include 1000 _different_ files for both single and double quotes in each test, and come up with a mean of about 3 one-thousands of a second in favor of double quotes. Not totally scientific but produces a fairly accurate result.


You on the other hand, run a test including the _same_ file 10,000 times (which brings into play error handling if you define a function in that include file) and produce a result with a difference of about 7 one-hundredth of a second. A bit less scientific, but still produces a fairly accurate result.

With all that said...

1) The time difference in either test if way too small to make a difference.

2) It's a far cry from one of your earlier posts which read, "Well....i have a 30k script, with double i get 8 or 9 seconds, with
sigle i get 0.05 or 0.08 seconds. The script basically made a lot of
querys, its part of a user manager module of a system im writing."


3)  Meatbread indeed.

--
By-Tor.com
...it's all about the Rush
http://www.by-tor.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux