You are here: Re: [PHP] Include file « PHP « IT news, forums, messages
Re: [PHP] Include file

Posted by John Nichel on 03/31/05 04:14

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация