Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:29000 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77972 invoked by uid 1010); 24 Apr 2007 20:45:46 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 77957 invoked from network); 24 Apr 2007 20:45:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2007 20:45:46 -0000 Authentication-Results: pb1.pair.com smtp.mail=mark@cyanox.nl; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mark@cyanox.nl; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cyanox.nl from 62.163.191.140 cause and error) X-PHP-List-Original-Sender: mark@cyanox.nl X-Host-Fingerprint: 62.163.191.140 a191140.upc-a.chello.nl Received: from [62.163.191.140] ([62.163.191.140:36312] helo=a191140.upc-a.chello.nl) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/92-60955-77C6E264 for ; Tue, 24 Apr 2007 16:45:45 -0400 Received: from [192.168.0.105] ([::ffff:192.168.0.105]) (AUTH: LOGIN mark, SSL: TLSv1/SSLv3,256bits,AES256-SHA) by a191140.upc-a.chello.nl with esmtp; Tue, 24 Apr 2007 22:45:42 +0200 id 0000000000C5C005.00000000462E6C77.00004F02 Message-ID: <462E6C6E.9020900@cyanox.nl> Date: Tue, 24 Apr 2007 22:45:34 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061115 Thunderbird/1.5.0.8 Mnenhy/0.7.4.666 MIME-Version: 1.0 To: "internals@lists.php.net" References: <462DD77B.7070006@zend.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] require_once From: mark@cyanox.nl ("mark@cyanox.nl") dletz@blog.de wrote: > Wow thats fast! > > On my machine i get these results: > Win32 (PHP 5.2.1 CLI) > > require_once - 1.7735 sec > myrequire_once - 1.0973 sec I made two benchmarks one with relative paths and one with full paths. The full paths: Here the benchmarks with relative paths: Ubuntu 6.10, intel core 2 duo 1.66Ghz (It only uses one core afaik). PHP 5.2.0 (cli) (built: Mar 16 2007 19:40:08) require_once 0.1123 myrequire_once 0.2582 Ubuntu 6.10, Pentium 4 3Ghz (Dual core also but probably only using one core). PHP 5.1.6 (cli) (built: Mar 7 2007 12:48:25) require_once 0.0984 myrequire_once 0.2800 Ubuntu 7.04, AMD 64bit 3700+. PHP 5.2.1 (cli) (built: Feb 20 2007 20:11:58) require_once 0.0663 myrequire_once 0.1639 Windows 2000, AMD 64bit 3200+. PHP 5.1.4 (cli) (built: May 4 2006 10:35:22) require_once 0.1590 myrequire_once 0.5190 With full paths: Ubuntu 6.10, intel core 2 duo 1.66Ghz (It only uses one core afaik). PHP 5.2.0 (cli) (built: Mar 16 2007 19:40:08) require_once 0.1032 myrequire_once 0.3082 Ubuntu 6.10, Pentium 4 3Ghz (Dual core also but probably only using one core). PHP 5.1.6 (cli) (built: Mar 7 2007 12:48:25) require_once 0.0967 myrequire_once 0.2944 Ubuntu 7.04, AMD 64bit 3700+. PHP 5.2.1 (cli) (built: Feb 20 2007 20:11:58) require_once 0.0634 myrequire_once 0.1528 Windows 2000, AMD 64bit 3200+. PHP 5.1.4 (cli) (built: May 4 2006 10:35:22) require_once 0.2115 myrequire_once 0.6158 now I only have one windows system to test on but from this test it seems that the full path version is slower on windows then the relative paths. Which struck me as odd so I actually reran the tests several times. The myrequire_once function is generally slower across my test cases then require_once.