Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36055 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72623 invoked from network); 8 Mar 2008 05:09:27 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2008 05:09:27 -0000 Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 38.99.98.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 38.99.98.18 beast.bluga.net Linux 2.6 Received: from [38.99.98.18] ([38.99.98.18:55805] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F6/02-57003-58F12D74 for ; Sat, 08 Mar 2008 00:09:27 -0500 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 0860AC0FE94; Fri, 7 Mar 2008 22:09:23 -0700 (MST) Received: from [192.168.0.106] (CPE-76-84-4-101.neb.res.rr.com [76.84.4.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 9546FC0FE8A; Fri, 7 Mar 2008 22:09:22 -0700 (MST) Message-ID: <47D21F95.7090704@chiaraquartet.net> Date: Fri, 07 Mar 2008 23:09:41 -0600 User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: internals Mailing List , Dmitry Stogov X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: profiling followup on addition of streams to include_path - it's *faster* From: greg@chiaraquartet.net (Gregory Beaver) Hi, When I posted yesterday's patch to add stream support to include_path (http://news.php.net/php.internals/36031) I mentioned that I suspected benchmarking would reveal it to be slow. My primary goal is to provide no impact on current users who are using a traditional include_path, with a secondary goal of improving performance of those who use the new syntax. Today I ran callgrind on the thing, with some surprising results. With the patch, include is *faster* for our traditional users than it is now. With the patch, include_once with >1000 unique files is about 3% slower - not the whole execution, just include_once With the patch, include_once with 1 unique file included 10000 times is insignificantly slower (about 0.4%) For these reasons, I'm really encouraged :). The next step is to absolutely ensure correctness and then see if the streams part of include_path can be optimized at all (or if it needs it). Details ====== I just ran callgrind on this script: